2014-10-02 46 views
-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 
+0

你的logcat清楚地顯示你在'MapActivity'的第25行有一個NullPointerException異常。第二次崩潰顯示在第26行。 – 2014-10-02 15:00:48

+0

請顯示您的代碼 – MillaresRoo 2014-10-02 15:01:34

+0

在例外情況之間大約需要5分鐘,因此您可能在此期間編輯了代碼。後者的痕跡更加相關。 – laalto 2014-10-02 15:03:36

回答

0

getExtras()該方法返回通過Intent通過一個Bundle包含所有的演員,但如果沒有數據傳遞,則返回null。可能這是你問題的根源?

+0

恢復。 thnx很多 – 2014-10-09 14:12:23