Tencent / QMUI_Android

提高 Android UI 开发效率的 UI 库
http://qmuiteam.com/android
Other
14.46k stars 2.68k forks source link

横竖屏切换 崩溃 #967

Open luwei1991 opened 4 years ago

luwei1991 commented 4 years ago

运行环境

具体问题描述

问题截图

Layout Inspector 文件(如何获取)

异常日志(堆栈)

2020-07-10 10:18:47.599 28515-28515/com.product.sampling I/AppCompatDelegate: The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's 2020-07-10 10:18:47.632 28515-28515/com.product.sampling I/zygote: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2020-07-10 10:18:47.632 28515-28515/com.product.sampling I/zygote: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2474) 2020-07-10 10:18:47.632 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.util.QMUIWindowInsetHelper.(android.view.ViewGroup, com.qmuiteam.qmui.widget.IWindowInsetLayout) (QMUIWindowInsetHelper.java:69) 2020-07-10 10:18:47.632 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet, int) (QMUIWindowInsetLayout.java:53) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet) (QMUIWindowInsetLayout.java:48) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet, int) (SwipeBackLayout.java:126) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet) (SwipeBackLayout.java:122) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context) (SwipeBackLayout.java:118) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at com.qmuiteam.qmui.arch.SwipeBackLayout com.qmuiteam.qmui.arch.SwipeBackLayout.wrap(android.content.Context, int, com.qmuiteam.qmui.arch.SwipeBackLayout$ViewMoveAction, com.qmuiteam.qmui.arch.SwipeBackLayout$Callback) (SwipeBackLayout.java:797) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.QMUIActivity.setContentView(int) (QMUIActivity.java:140) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.base.BaseActivity.setContentView(int) (BaseActivity.java:79) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.masterplate.MasterplterMainActivity.onCreate(android.os.Bundle) (MasterplterMainActivity.java:50) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1593) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.os.Looper.loop() (Looper.java:164) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/base.apk"],nativeLibraryDirectories=[/data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/lib/x86, /data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/base.apk!/lib/x86, /system/lib, /vendor/lib]] 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2474) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.util.QMUIWindowInsetHelper.(android.view.ViewGroup, com.qmuiteam.qmui.widget.IWindowInsetLayout) (QMUIWindowInsetHelper.java:69) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet, int) (QMUIWindowInsetLayout.java:53) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet) (QMUIWindowInsetLayout.java:48) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet, int) (SwipeBackLayout.java:126) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet) (SwipeBackLayout.java:122) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context) (SwipeBackLayout.java:118) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at com.qmuiteam.qmui.arch.SwipeBackLayout com.qmuiteam.qmui.arch.SwipeBackLayout.wrap(android.content.Context, int, com.qmuiteam.qmui.arch.SwipeBackLayout$ViewMoveAction, com.qmuiteam.qmui.arch.SwipeBackLayout$Callback) (SwipeBackLayout.java:797) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.QMUIActivity.setContentView(int) (QMUIActivity.java:140) 2020-07-10 10:18:47.633 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.base.BaseActivity.setContentView(int) (BaseActivity.java:79) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.masterplate.MasterplterMainActivity.onCreate(android.os.Bundle) (MasterplterMainActivity.java:50) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1593) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.os.Looper.loop() (Looper.java:164) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240) 2020-07-10 10:18:47.634 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2474) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.util.QMUIWindowInsetHelper.(android.view.ViewGroup, com.qmuiteam.qmui.widget.IWindowInsetLayout) (QMUIWindowInsetHelper.java:69) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet, int) (QMUIWindowInsetLayout.java:53) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet) (QMUIWindowInsetLayout.java:48) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet, int) (SwipeBackLayout.java:126) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet) (SwipeBackLayout.java:122) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context) (SwipeBackLayout.java:118) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at com.qmuiteam.qmui.arch.SwipeBackLayout com.qmuiteam.qmui.arch.SwipeBackLayout.wrap(android.content.Context, int, com.qmuiteam.qmui.arch.SwipeBackLayout$ViewMoveAction, com.qmuiteam.qmui.arch.SwipeBackLayout$Callback) (SwipeBackLayout.java:797) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.QMUIActivity.setContentView(int) (QMUIActivity.java:140) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.base.BaseActivity.setContentView(int) (BaseActivity.java:79) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.masterplate.MasterplterMainActivity.onCreate(android.os.Bundle) (MasterplterMainActivity.java:50) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892) 2020-07-10 10:18:47.635 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1593) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void android.os.Looper.loop() (Looper.java:164) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/base.apk"],nativeLibraryDirectories=[/data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/lib/x86, /data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/base.apk!/lib/x86, /system/lib, /vendor/lib]] 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2474) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.util.QMUIWindowInsetHelper.(android.view.ViewGroup, com.qmuiteam.qmui.widget.IWindowInsetLayout) (QMUIWindowInsetHelper.java:69) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet, int) (QMUIWindowInsetLayout.java:53) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet) (QMUIWindowInsetLayout.java:48) 2020-07-10 10:18:47.636 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet, int) (SwipeBackLayout.java:126) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet) (SwipeBackLayout.java:122) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context) (SwipeBackLayout.java:118) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at com.qmuiteam.qmui.arch.SwipeBackLayout com.qmuiteam.qmui.arch.SwipeBackLayout.wrap(android.content.Context, int, com.qmuiteam.qmui.arch.SwipeBackLayout$ViewMoveAction, com.qmuiteam.qmui.arch.SwipeBackLayout$Callback) (SwipeBackLayout.java:797) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.QMUIActivity.setContentView(int) (QMUIActivity.java:140) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.base.BaseActivity.setContentView(int) (BaseActivity.java:79) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.masterplate.MasterplterMainActivity.onCreate(android.os.Bundle) (MasterplterMainActivity.java:50) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1593) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.os.Looper.loop() (Looper.java:164) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2474) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.util.QMUIWindowInsetHelper.(android.view.ViewGroup, com.qmuiteam.qmui.widget.IWindowInsetLayout) (QMUIWindowInsetHelper.java:69) 2020-07-10 10:18:47.637 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet, int) (QMUIWindowInsetLayout.java:53) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet) (QMUIWindowInsetLayout.java:48) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet, int) (SwipeBackLayout.java:126) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet) (SwipeBackLayout.java:122) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context) (SwipeBackLayout.java:118) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at com.qmuiteam.qmui.arch.SwipeBackLayout com.qmuiteam.qmui.arch.SwipeBackLayout.wrap(android.content.Context, int, com.qmuiteam.qmui.arch.SwipeBackLayout$ViewMoveAction, com.qmuiteam.qmui.arch.SwipeBackLayout$Callback) (SwipeBackLayout.java:797) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.QMUIActivity.setContentView(int) (QMUIActivity.java:140) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.base.BaseActivity.setContentView(int) (BaseActivity.java:79) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.masterplate.MasterplterMainActivity.onCreate(android.os.Bundle) (MasterplterMainActivity.java:50) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1593) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.os.Looper.loop() (Looper.java:164) 2020-07-10 10:18:47.638 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/base.apk"],nativeLibraryDirectories=[/data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/lib/x86, /data/app/com.product.sampling-VvEi7h_yIO7Cc5HwfgreAw==/base.apk!/lib/x86, /system/lib, /vendor/lib]] 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:93) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void androidx.core.view.ViewCompat.setOnApplyWindowInsetsListener(android.view.View, androidx.core.view.OnApplyWindowInsetsListener) (ViewCompat.java:2474) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.util.QMUIWindowInsetHelper.(android.view.ViewGroup, com.qmuiteam.qmui.widget.IWindowInsetLayout) (QMUIWindowInsetHelper.java:69) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet, int) (QMUIWindowInsetLayout.java:53) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.widget.QMUIWindowInsetLayout.(android.content.Context, android.util.AttributeSet) (QMUIWindowInsetLayout.java:48) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet, int) (SwipeBackLayout.java:126) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context, android.util.AttributeSet) (SwipeBackLayout.java:122) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.SwipeBackLayout.(android.content.Context) (SwipeBackLayout.java:118) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at com.qmuiteam.qmui.arch.SwipeBackLayout com.qmuiteam.qmui.arch.SwipeBackLayout.wrap(android.content.Context, int, com.qmuiteam.qmui.arch.SwipeBackLayout$ViewMoveAction, com.qmuiteam.qmui.arch.SwipeBackLayout$Callback) (SwipeBackLayout.java:797) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.qmuiteam.qmui.arch.QMUIActivity.setContentView(int) (QMUIActivity.java:140) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.base.BaseActivity.setContentView(int) (BaseActivity.java:79) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void com.product.sampling.ui.masterplate.MasterplterMainActivity.onCreate(android.os.Bundle) (MasterplterMainActivity.java:50) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6975) 2020-07-10 10:18:47.639 28515-28515/com.product.sampling I/zygote: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1213) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2770) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2892) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1593) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:105) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void android.os.Looper.loop() (Looper.java:164) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6541) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.Zygote$MethodAndArgsCaller.run() (Zygote.java:240) 2020-07-10 10:18:47.640 28515-28515/com.product.sampling I/zygote: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:767)

cgspine commented 4 years ago

可以贴一下这个 activity 的代码吗?

luwei1991 commented 4 years ago

android:configChanges="keyboardHidden|orientation|screenSize" 应该是我切换的时候没有设置screenSize导致的,频繁横竖切换导致异常退出。谢谢大佬!