안드로이드 개발 질문/답변
(글 수 45,052)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): FATAL EXCEPTION: main
09-08 07:07:14.277: ERROR/AndroidRuntime(456): java.lang.RuntimeException: Unable to instantiate service com.bloodybell.AndroMate.updateService: java.lang.NullPointerException
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2943)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.app.ActivityThread.access$3300(ActivityThread.java:125)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.os.Handler.dispatchMessage(Handler.java:99)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.os.Looper.loop(Looper.java:123)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at java.lang.reflect.Method.invokeNative(Native Method)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at java.lang.reflect.Method.invoke(Method.java:521)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at dalvik.system.NativeStart.main(Native Method)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): Caused by: java.lang.NullPointerException
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:100)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at com.bloodybell.AndroMate.updateService.<init>(updateService.java:16)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at java.lang.Class.newInstanceImpl(Native Method)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at java.lang.Class.newInstance(Class.java:1429)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2940)
09-08 07:07:14.277: ERROR/AndroidRuntime(456): ... 10 more
AppWidget 실행할 때 onUpdate에서 서비스를 실행했는데 런타임오류가 떠서 logcat을 보니까 이렇게 나왔어요..