I’m new to all this crazy Android/Java programming stuff. I have an app that (somehow) I managed to figure out how to add in-app billing items to. I’m pretty sure the error is related to in-app billing, but I’m not able to reproduce the problem on any of my devices.
NullPointerException
in ComponentName.<init>()
java.lang.RuntimeException: Unable to destroy activity {ca.ajwest.BeerConverter/ca.ajwest.BeerConverter.BeerConverter}: java.lang.NullPointerException
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3035)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3100)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3216)
at android.app.ActivityThread.access$1600(ActivityThread.java:132)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1037)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.content.ComponentName.<init>(ComponentName.java:75)
at android.content.Intent.<init>(Intent.java:2893)
at ca.ajwest.BeerConverter.BillingHelper.stopService(BillingHelper.java:270)
at ca.ajwest.BeerConverter.BeerConverter.onDestroy(BeerConverter.java:615)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3017)
... 12 more
Could somebody please direct me to some resources where I can learn more about this output or something? Does anybody have any similar experiences?
Here’s the source if that helps at all.
Thanks for your help.
You should look your line 270 in BillingHelper.java and line 615 in BillingConverter. In error log, you should look for mainly two things; first, a line number which is related with your application names, second; name of the exception.
You see that
says, there is a null pointer exception in one of your classes. Line numbers are also noted to check. There should be a variable, which isn’t initialized or already destroyed.
I hope that helps.