-3
10-02 14:51:23.938: E/AndroidRuntime(1524): FATAL EXCEPTION: main
10-02 14:51:23.938: E/AndroidRuntime(1524): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mani/com.example.mani.MapActivity}: java.lang.NullPointerException
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.ActivityThread.access$600(ActivityThread.java:141)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.os.Handler.dispatchMessage(Handler.java:99)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.os.Looper.loop(Looper.java:137)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.ActivityThread.main(ActivityThread.java:5041)
10-02 14:51:23.938: E/AndroidRuntime(1524): at java.lang.reflect.Method.invokeNative(Native Method)
10-02 14:51:23.938: E/AndroidRuntime(1524): at java.lang.reflect.Method.invoke(Method.java:511)
10-02 14:51:23.938: E/AndroidRuntime(1524): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-02 14:51:23.938: E/AndroidRuntime(1524): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-02 14:51:23.938: E/AndroidRuntime(1524): at dalvik.system.NativeStart.main(Native Method)
10-02 14:51:23.938: E/AndroidRuntime(1524): Caused by: java.lang.NullPointerException
10-02 14:51:23.938: E/AndroidRuntime(1524): at com.example.mani.MapActivity.onCreate(MapActivity.java:25)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.Activity.performCreate(Activity.java:5104)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
10-02 14:51:23.938: E/AndroidRuntime(1524): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
10-02 14:51:23.938: E/AndroidRuntime(1524): ... 11 more
10-02 14:55:46.319: E/AndroidRuntime(1784): FATAL EXCEPTION: main
10-02 14:55:46.319: E/AndroidRuntime(1784): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mani/com.example.mani.MapActivity}: java.lang.NullPointerException
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.ActivityThread.access$600(ActivityThread.java:141)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.os.Handler.dispatchMessage(Handler.java:99)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.os.Looper.loop(Looper.java:137)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.ActivityThread.main(ActivityThread.java:5041)
10-02 14:55:46.319: E/AndroidRuntime(1784): at java.lang.reflect.Method.invokeNative(Native Method)
10-02 14:55:46.319: E/AndroidRuntime(1784): at java.lang.reflect.Method.invoke(Method.java:511)
10-02 14:55:46.319: E/AndroidRuntime(1784): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
10-02 14:55:46.319: E/AndroidRuntime(1784): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
10-02 14:55:46.319: E/AndroidRuntime(1784): at dalvik.system.NativeStart.main(Native Method)
10-02 14:55:46.319: E/AndroidRuntime(1784): Caused by: java.lang.NullPointerException
10-02 14:55:46.319: E/AndroidRuntime(1784): at com.example.mani.MapActivity.onCreate(MapActivity.java:26)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.Activity.performCreate(Activity.java:5104)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
10-02 14:55:46.319: E/AndroidRuntime(1784): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
10-02 14:55:46.319: E/AndroidRuntime(1784): ... 11 more
你的logcat清楚地顯示你在'MapActivity'的第25行有一個NullPointerException異常。第二次崩潰顯示在第26行。 – 2014-10-02 15:00:48
請顯示您的代碼 – MillaresRoo 2014-10-02 15:01:34
在例外情況之間大約需要5分鐘,因此您可能在此期間編輯了代碼。後者的痕跡更加相關。 – laalto 2014-10-02 15:03:36