我是Android开发的新手。我开发了一个应用程序并将其发布到谷歌播放但最近我发现崩溃报告,因为许多崩溃发生在代码的特定部分,如下所示。我想不明白。
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity
(ActivityThread.java:2643)
at android.app.ActivityThread.handleLaunchActivity
(ActivityThread.java:2709)
at android.app.ActivityThread.access$1000 (ActivityThread.java:196)
at android.app.ActivityThread$H.handleMessage
(ActivityThread.java:1534)
at android.os.Handler.dispatchMessage (Handler.java:111)
at android.os.Looper.loop (Looper.java:207)
at android.app.ActivityThread.main (ActivityThread.java:5867)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:1026)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:887)
Caused by: java.lang.NullPointerException:
at local.app.user.myapp.MainActivity.onCreate
(MainActivity.java:154)
at android.app.Activity.performCreate (Activity.java:6285)
at android.app.Instrumentation.callActivityOnCreate (
Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity
(ActivityThread.java:2596)