错误:警报(无法启动接收器)

时间:2012-05-24 06:22:42

标签: android broadcastreceiver alarmmanager

请告知我的代码问题是什么... 我不断得到这个例外任何建议都会非常感激。

STACK_TRACE=java.lang.RuntimeException: Unable to start receiver com.platinumapps.platinumtasks.AlarmReceiver: java.lang.NullPointerException
at android.app.ActivityThread.handleReceiver(ActivityThread.java:1975)
at android.app.ActivityThread.access$1400(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1074)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.platinumapps.platinumtasks.AlarmReceiver.onReceive(AlarmReceiver.java:109)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:1968)
... 10 more
java.lang.NullPointerException
at com.platinumapps.platinumtasks.AlarmReceiver.onReceive(AlarmReceiver.java:109)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:1968)
at android.app.ActivityThread.access$1400(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1074)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:0)

它是一个nullpointer异常。 意味着您正在调用的内容未正确启动,或者您无法访问该部分(例如,在AndroidManifest中没有使用decalred活动。或者没有包含权利罐等) 如果您需要更好的帮助,请发布您正在使用的代码。