Java OnUnhandledKeyEventListener未知错误
我得到这个错误: 拒绝在以前失败的类java.lang.class上重新初始化 我花了几个小时搜索谷歌,但就是找不到原因,让我困惑的是,该应用程序在早于v28的API上运行。 但在所有运行api 28的设备上都会崩溃 日志附后: 片段在onCreate函数中处理 有人看到这里有什么问题吗?我已经试了几个小时,似乎找不到解决办法Java OnUnhandledKeyEventListener未知错误,java,android,material-design,Java,Android,Material Design,我得到这个错误: 拒绝在以前失败的类java.lang.class上重新初始化 我花了几个小时搜索谷歌,但就是找不到原因,让我困惑的是,该应用程序在早于v28的API上运行。 但在所有运行api 28的设备上都会崩溃 日志附后: 片段在onCreate函数中处理 有人看到这里有什么问题吗?我已经试了几个小时,似乎找不到解决办法 07-02 12:59:51.667 18223-18223/? I/art: Not late-enabling -Xcheck:jni (already on) 07
07-02 12:59:51.667 18223-18223/? I/art: Not late-enabling -Xcheck:jni (already on)
07-02 12:59:51.699 18223-18233/? I/art: Debugger is no longer active
07-02 12:59:51.752 18223-18223/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
07-02 12:59:51.775 18223-18223/? I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
07-02 12:59:52.248 18223-18241/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
07-02 12:59:52.256 18223-18223/? D/Atlas: Validating map...
07-02 12:59:52.295 18223-18241/? I/OpenGLRenderer: Initialized EGL, version 1.4
07-02 12:59:52.296 18223-18241/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
07-02 12:59:52.300 18223-18241/? D/EGL_emulation: eglCreateContext: 0x7f42be844b60: maj 2 min 0 rcv 2
07-02 12:59:52.320 18223-18241/? D/EGL_emulation: eglMakeCurrent: 0x7f42be844b60: ver 2 0
07-02 12:59:52.326 18223-18241/? D/OpenGLRenderer: Enabling debug mode 0
07-02 12:59:52.344 18223-18241/? D/EGL_emulation: eglMakeCurrent: 0x7f42be844b60: ver 2 0
07-02 12:59:53.408 18223-18223/freeskate.esk8hub.skatehub I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
07-02 12:59:51.667 18223-18223/? I/art: Not late-enabling -Xcheck:jni (already on)
07-02 12:59:51.699 18223-18233/? I/art: Debugger is no longer active
07-02 12:59:51.752 18223-18223/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
07-02 12:59:51.775 18223-18223/? I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
07-02 12:59:52.248 18223-18241/? D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
07-02 12:59:52.256 18223-18223/? D/Atlas: Validating map...
07-02 12:59:52.295 18223-18241/? I/OpenGLRenderer: Initialized EGL, version 1.4
07-02 12:59:52.296 18223-18241/? W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
07-02 12:59:52.300 18223-18241/? D/EGL_emulation: eglCreateContext: 0x7f42be844b60: maj 2 min 0 rcv 2
07-02 12:59:52.320 18223-18241/? D/EGL_emulation: eglMakeCurrent: 0x7f42be844b60: ver 2 0
07-02 12:59:52.326 18223-18241/? D/OpenGLRenderer: Enabling debug mode 0
07-02 12:59:52.344 18223-18241/? D/EGL_emulation: eglMakeCurrent: 0x7f42be844b60: ver 2 0
07-02 12:59:53.408 18223-18223/? I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
07-02 13:32:22.589 18223-18233/? I/art: Debugger is no longer active
int id = item.getItemId();
//Below we will instantiate the fragments into the nav-view. Instead of hiding and showing individual elements manually
if (id == R.id.nav_login) {
//Handle login action
fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.main_container, new Login());
fragmentTransaction.commit();
getSupportActionBar().setTitle("Login");
} else if (id == R.id.nav_register) {
//Handle register action
fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.main_container, new Register());
fragmentTransaction.commit();
getSupportActionBar().setTitle("Register");
} else if (id == R.id.nav_support) {
//Handle support action.
fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.main_container, new Support());
fragmentTransaction.commit();
getSupportActionBar().setTitle("Support");
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
return true;
//Lets add the fragments to the frame layout in the design file.
fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.add(R.id.main_container, new Login());
fragmentTransaction.commit();
getSupportActionBar().setTitle("Login");