有点像菜鸟的问题,但在分析堆栈跟踪时,假设堆栈跟踪中的第一个或最顶层的项目是最新的,我是否正确?在我的情况下,“performDestroyActivity”是崩溃的原因还是结果?
调试崩溃原因的下一步应该是什么?
这是我的 BugSense 报告
java.lang.RuntimeException: Unable to destroy activity {ca.foo.awesomeapp/ca.foo.awesomeapp.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3497)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3515)
at android.app.ActivityThread.access$1400(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1249)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException
at com.wiley.wroxaccessories.WroxAccessory.disconnect(WroxAccessory.java:79)
at ca.foo.awesomeapp.MainActivity.onDestroy(MainActivity.java:179)
at android.app.Activity.performDestroy(Activity.java:5403)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1117)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3484)
... 11 more