You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
具体是代码的哪个分支:(androidx)
具体是Demo中哪个模块:(简单版)
该模块你改了哪些配置具体描述:(简单版中只钩选开启拍摄功能)
具体错误:
java.lang.RuntimeException: Unable to destroy activity {com.zhongjh.cameraapp/com.zhongjh.albumcamerarecorder.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.material.tabs.TabLayoutMediator.detach()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5309)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5339)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2246)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8010)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.material.tabs.TabLayoutMediator.detach()' on a null object reference
at com.zhongjh.albumcamerarecorder.MainActivity.onDestroy(MainActivity.java:138)
at android.app.Activity.performDestroy(Activity.java:8251)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1364)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5294)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5339)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2246)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8010)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
期待修复的效果
(希望正常运行)
The text was updated successfully, but these errors were encountered:
描述你遇到的问题
(点击首页列表中的简单版按钮,进入界面后只钩选开启拍摄功能,点击+按钮,进入拍照界面,点击返回按钮,应用崩溃,在OnePlus 7上必现)
是否使用作者Demo报错
(是)
如果是作者Demo出错
具体是代码的哪个分支:(androidx)
具体是Demo中哪个模块:(简单版)
该模块你改了哪些配置具体描述:(简单版中只钩选开启拍摄功能)
具体错误:
java.lang.RuntimeException: Unable to destroy activity {com.zhongjh.cameraapp/com.zhongjh.albumcamerarecorder.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.material.tabs.TabLayoutMediator.detach()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5309)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5339)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2246)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8010)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.material.tabs.TabLayoutMediator.detach()' on a null object reference
at com.zhongjh.albumcamerarecorder.MainActivity.onDestroy(MainActivity.java:138)
at android.app.Activity.performDestroy(Activity.java:8251)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1364)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5294)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5339)
at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2246)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8010)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
期待修复的效果
(希望正常运行)
The text was updated successfully, but these errors were encountered: