不幸的是,应用已停止在Android模拟器中 -

时间:2012-07-12 09:36:36

标签: android android-intent android-emulator android-listview

这是我的Logcat的显示项目。我的应用程序没有错误,但不幸的是停止了

07-12 14:43:15.651: E/AndroidRuntime(1475): FATAL EXCEPTION: main

07-12 14:43:15.651: E/AndroidRuntime(1475): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { cmp=com.delgence.timetracker/.AddTimeActivity (has extras) }} to activity {com.delgence.timetracker/com.delgence.timetracker.MainActivity}: java.lang.NullPointerException

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.ActivityThread.deliverResults(ActivityThread.java:2980)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.ActivityThread.handleSendResult(ActivityThread.java:3023)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.ActivityThread.access$1100(ActivityThread.java:123)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1177)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.os.Handler.dispatchMessage(Handler.java:99)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.os.Looper.loop(Looper.java:137)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.ActivityThread.main(ActivityThread.java:4424)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at java.lang.reflect.Method.invokeNative(Native Method)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at java.lang.reflect.Method.invoke(Method.java:511)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-12 14:43:15.651: E/AndroidRuntime(1475):     at dalvik.system.NativeStart.main(Native Method)
07-12 14:43:15.651: E/AndroidRuntime(1475): Caused by: java.lang.NullPointerException

07-12 14:43:15.651: E/AndroidRuntime(1475):     at com.delgence.timetracker.MainActivity.onActivityResult(MainActivity.java:46)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.Activity.dispatchActivityResult(Activity.java:4649)

07-12 14:43:15.651: E/AndroidRuntime(1475):     at android.app.ActivityThread.deliverResults(ActivityThread.java:2976)

07-12 14:43:15.651: E/AndroidRuntime(1475):     ... 11 more
07-12 14:43:15.841: I/dalvikvm(1475): threadid=3: reacting to signal 3
07-12 14:43:16.182: I/dalvikvm(1475): Wrote stack traces to '/data/anr/traces.txt'
07-12 14:43:16.473: I/dalvikvm(1475): threadid=3: reacting to signal 3
07-12 14:43:16.614: I/dalvikvm(1475): Wrote stack traces to '/data/anr/traces.txt'
07-12 14:43:17.211: I/dalvikvm(1475): threadid=3: reacting to signal 3
07-12 14:43:17.335: I/dalvikvm(1475): Wrote stack traces to '/data/anr/traces.txt'
07-12 14:43:21.144: I/Process(1475): Sending signal. PID: 1475 SIG: 9

1 个答案:

答案 0 :(得分:0)

您的通话活动似乎已被销毁。因此,被调用的活动无法将结果返回给您的调用活动。例如,如果您在被叫活动中轮换手机,或者您完成了通话活动,就会发生这种情况。