简体   繁体   中英

android error: java.lang.NullPointerException

i get user reports that the app crash in the online console i find several crash logs like

java.lang.RuntimeException: Unable to start service
com.chris.mydays.UpdateWidgets@428eb2d8 with null:
java.lang.NullPointerException at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2555)
at android.app.ActivityThread.access$1900(ActivityThread.java:139) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1328)
at android.os.Handler.dispatchMessage(Handler.java:99) at
android.os.Looper.loop(Looper.java:137) at
android.app.ActivityThread.main(ActivityThread.java:5021) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:511) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at
dalvik.system.NativeStart.main(Native Method) Caused by:
java.lang.NullPointerException at
com.chris.mydays.UpdateWidgets.onStart(UpdateWidgets.java:50) at
android.app.Service.onStartCommand(Service.java:450) at
android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2538)
... 10 more

any idea whats about and i can do?

thanks chris

I think the most significant lines are these two:

com.chris.mydays.UpdateWidgets.onStart(UpdateWidgets.java:50) at android.app.Service.onStartCommand(Service.java:450) at

So I'd open your UpdateWidgets.java file and go to line 50, which should be in a Service in the onStartCommand() method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM