Android 模拟器的偏好问题 activity

Android Emulator issues with preference activity

我遇到了 Android 模拟器的问题,我已经在谷歌上搜索了一下,但找不到有效的答案。

我有一个简单的应用程序 activity,带有滑动视图(使用 android.support.v4.view.PagerTabStrip 滑动片段)。这很好,除了 API 21 或高屏幕分辨率上的一些奇怪的交换仿真。

我添加了首选项 activity,由我的主菜单触发 activity:

public boolean onOptionsItemSelected(MenuItem item) {
    ...
    int id = item.getItemId();
    if (id == R.id.action_settings) {
        // start the preference activity
        Intent aIntentPref = new Intent();
        aIntentPref.setClass(MainActivity.this, PrefsActivity.class);
        startActivityForResult(aIntentPref, FC_SETTINGS);
        return true;
    }
    ...
    return super.onOptionsItemSelected(item);
}

我的 PrefsActivity class 非常简单,只需加载一个 PreferenceFragment,目前它只包含一个 ListPreference

public class PrefsActivity extends PreferenceActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getFragmentManager().beginTransaction().replace(android.R.id.content,
                new PrefsFragment()).commit();
    }
}

在我的设备 (hdpi API16) 或大多数模拟器中,它运行良好。 我的问题是,当我使用具有 API21(棒棒糖)或 xxhdpi 大小(使用 xxhdpi API 19 或具有 API21 - 甚至 lhdpi 的任何大小进行测试)的模拟器时,当单击菜单项,没有任何反应(应用程序保留在 MainActivity 中)但我可以在 logcat 中看到以下内容:

1817-1817/{pack} W/EGL_emulation﹕ eglSurfaceAttrib not implemented
1817-1817/{pack} W/InputEventReceiver﹕ Attempted to finish an input event but the input event receiver has already been disposed.
1817-1817/{pack} W/InputEventReceiver﹕ Attempted to finish an input event but the input event receiver has already been disposed.
1817-1817/{pack} W/ViewRootImpl﹕ Dropping event due to root view being removed: MotionEvent { action=ACTION_MOVE, id[0]=0, x[0]=115.0, y[0]=76.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=19114, downTime=19114, deviceId=0, source=0x1002 }

刚刚使用模拟器 API 19 - mdpi 进行了测试,它工作正常。

我怀疑模拟器在高分辨率或 API 下很糟糕 21,有人对如何解决这个问题或绕过这个测试问题有进一步的建议吗?我没有带 API 21 的任何设备。

感谢阅读到这里的人 ;-)

编辑

随着 AndroidStudio 更新,它在我的一些 android 模拟器测试中变得更好了,但在测试时问题仍然存在。我对生产版本没有不好的反馈,而在许多设备和 API 中 运行。所以我想没关系,只是模拟器问题。

这么长时间都没有得到答复,似乎这只是模拟器的问题,因为还没有报告真正的问题。