I get a java.lang.NullPointerException exception when the application starts and it disconnects. Emulator Error: "Unfortunately, appname has stopped." It worked fine until I wrote a bunch of new code and changed the manifest. I hope this is not a manifest, but my question is, how can I find out which line of code is the problem? A trace dump means nothing to me, and although it is verbose, having ... 11 more does not allow me to see all this.
I do not know what it means. I was looking for it, but there seems to be a list of things that this could mean. I tried Project> Clean, I tried messing around with the manifest again, but I still get the error. I checked / unchecked external libraries. Just did what people suggested doing for other people getting the same error. So I would really like to know in which line this was configured?
Here is the result, if that helps:
06-29 08:37:23.680: E/AndroidRuntime(1225): FATAL EXCEPTION: main
06-29 08:37:23.680: E/AndroidRuntime(1225): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.upliftly.android/com.upliftly.android.UpliftlyActivity}: java.lang.NullPointerException
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1879)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.ActivityThread.access$600(ActivityThread.java:122)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.os.Handler.dispatchMessage(Handler.java:99)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.os.Looper.loop(Looper.java:137)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.ActivityThread.main(ActivityThread.java:4340)
06-29 08:37:23.680: E/AndroidRuntime(1225): at java.lang.reflect.Method.invokeNative(Native Method)
06-29 08:37:23.680: E/AndroidRuntime(1225): at java.lang.reflect.Method.invoke(Method.java:511)
06-29 08:37:23.680: E/AndroidRuntime(1225): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-29 08:37:23.680: E/AndroidRuntime(1225): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-29 08:37:23.680: E/AndroidRuntime(1225): at dalvik.system.NativeStart.main(Native Method)
06-29 08:37:23.680: E/AndroidRuntime(1225): Caused by: java.lang.NullPointerException
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:101)
06-29 08:37:23.680: E/AndroidRuntime(1225): at com.upliftly.android.UpliftlyActivity.<init>(UpliftlyActivity.java:19)
06-29 08:37:23.680: E/AndroidRuntime(1225): at java.lang.Class.newInstanceImpl(Native Method)
06-29 08:37:23.680: E/AndroidRuntime(1225): at java.lang.Class.newInstance(Class.java:1319)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
06-29 08:37:23.680: E/AndroidRuntime(1225): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1870)
06-29 08:37:23.680: E/AndroidRuntime(1225): ... 11 more
source
share