Android Logcat error message. - android

These error messages appear when I run my Application. It doesn't affect the execution of the application though. The app is based on Android 4 ( API Level 14), it has some code to call a web service, and the build path has http-commons library.
02-12 10:39:11.110: E/AndroidRuntime(661): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.makeApplication(LoadedApk.java:482)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3909)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread.access$1300(ActivityThread.java:122)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1184)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.os.Looper.loop(Looper.java:137)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.ActivityThread.main(ActivityThread.java:4340)
02-12 10:39:11.110: E/AndroidRuntime(661): at java.lang.reflect.Method.invokeNative(Native Method )
02-12 10:39:11.110: E/AndroidRuntime(661): at java.lang.reflect.Method.invoke(Method.java:511)
02-12 10:39:11.110: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-12 10:39:11.110: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-12 10:39:11.110: E/AndroidRuntime(661): at dalvik.system.NativeStart.main(Native Method)
02-12 10:39:11.110: E/AndroidRuntime(661): Caused by: java.lang.NullPointerException
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:362)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.getClassLoader(LoadedApk.java:305)
02-12 10:39:11.110: E/AndroidRuntime(661): at android.app.LoadedApk.makeApplication(LoadedApk.java:474)
02-12 10:39:11.110: E/AndroidRuntime(661): ... 11 more

If you google for initializeJavaContextClassLoader NullPointerException you'll find you are definitely not the only one running into this. The solution isn't really clear though.
Have you tried doing a Project -> Clean and rebuilding?

Related

Android - Is there any reason why my app should crash when I add a sound file to raw?

My app crashes when I try to open in. The only change I've made was adding a .ogg file to my res/raw directory. It's really weird. I haven't added any codes or made any other changes. I just dragged a sound file into raw and compiled. It just keeps saying "unfortunately blah has stopped". Are there any obvious things I should check?
MainActivity.onCreate:
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.engine_layout);
myEngineView = (EngineView) findViewById(R.id.engineviewid);
myEngineView.setKeepScreenOn(true);
}
I get this in logcat:
E/AndroidRuntime(12560): FATAL EXCEPTION: main
E/AndroidRuntime(12560): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12560): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12560): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12560): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12560): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12560): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12560): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12560): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12560): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12560): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12560): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12560): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12560): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12560): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12560): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12560): ... 11 more
E/AppErrorDialog( 338): Failed to get ILowStorageHandle instance
E/Trace (12585): error opening trace file: No such file or directory (2)
E/AndroidRuntime(12585): FATAL EXCEPTION: main
E/AndroidRuntime(12585): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thing/com.example.thing.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(12585): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(12585): at android.app.ActivityThread.access$600(ActivityThread.java:149)
E/AndroidRuntime(12585): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
E/AndroidRuntime(12585): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(12585): at android.os.Looper.loop(Looper.java:153)
E/AndroidRuntime(12585): at android.app.ActivityThread.main(ActivityThread.java:4987)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12585): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
E/AndroidRuntime(12585): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
E/AndroidRuntime(12585): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12585): Caused by: java.lang.NullPointerException
E/AndroidRuntime(12585): at com.example.thing.MainActivity.onCreate(MainActivity.java:18)
E/AndroidRuntime(12585): at android.app.Activity.performCreate(Activity.java:5020)
E/AndroidRuntime(12585): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime(12585): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(12585): ... 11 more

Exception after clicked and closed banner

I have DoubleClick banners in 'MainActivity'(A) and in 'FindActivity'(B).
When I click banner in A - it opens and I'm pressing 'back' button - A appears again and works fine.
When click banner in B - it opens and I'm pressing 'back' - B did not appears. LogCat says:
05-29 16:38:27.542: E/AndroidRuntime(661): FATAL EXCEPTION: main
05-29 16:38:27.542: E/AndroidRuntime(661): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.my.myapp/com.my.myapp.FindActivity}: java.lang.NullPointerException
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.os.Handler.dispatchMessage(Handler.java:99)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.os.Looper.loop(Looper.java:130)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.main(ActivityThread.java:3687)
05-29 16:38:27.542: E/AndroidRuntime(661): at java.lang.reflect.Method.invokeNative(Native Method)
05-29 16:38:27.542: E/AndroidRuntime(661): at java.lang.reflect.Method.invoke(Method.java:507)
05-29 16:38:27.542: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
05-29 16:38:27.542: E/AndroidRuntime(661): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
05-29 16:38:27.542: E/AndroidRuntime(661): at dalvik.system.NativeStart.main(Native Method)
05-29 16:38:27.542: E/AndroidRuntime(661): Caused by: java.lang.NullPointerException
05-29 16:38:27.542: E/AndroidRuntime(661): at com.my.myapp.FindActivity.onCreate(FindActivity.java:125)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-29 16:38:27.542: E/AndroidRuntime(661): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
05-29 16:38:27.542: E/AndroidRuntime(661): ... 11 more
I've put breakpoint at line 125. Surprise - LogCat show exception without reaching breakpoint.
Code in onCreate is:
super.onCreate(savedInstanceState);//line124
m_current = MyApp.sInstance.GetName();//line 125 ========
Update
sInstance is App singleton.
added correct log copy
Update2
Bigger stack trace provided

Fatal Exception:main

I am having a little trouble. I am completely new at this. I am trying to get my app to start with a splash screen then continue on to a new activity, but my app keeps force closing with a fatal exception:main. this is the logcat
02-12 02:56:32.989: D/AndroidRuntime(1487): Shutting down VM
02-12 02:56:32.989: W/dalvikvm(1487): threadid=1: thread exiting with uncaught exception (group=0x4001e560)
02-12 02:56:33.009: E/AndroidRuntime(1487): FATAL EXCEPTION: main
02-12 02:56:33.009: E/AndroidRuntime(1487): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.madonk.LAFEST/com.madonk.LAFEST.MAIN}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1702)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1722)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.access$1500(ActivityThread.java:124)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:974)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.os.Looper.loop(Looper.java:130)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.main(ActivityThread.java:3821)
02-12 02:56:33.009: E/AndroidRuntime(1487): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 02:56:33.009: E/AndroidRuntime(1487): at java.lang.reflect.Method.invoke(Method.java:507)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-12 02:56:33.009: E/AndroidRuntime(1487): at dalvik.system.NativeStart.main(Native Method)
02-12 02:56:33.009: E/AndroidRuntime(1487): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ListActivity.onContentChanged(ListActivity.java:243)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.Activity.setContentView(Activity.java:1716)
02-12 02:56:33.009: E/AndroidRuntime(1487): at com.madonk.LAFEST.MAIN.onCreate(MAIN.java:17)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-12 02:56:33.009: E/AndroidRuntime(1487): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1666)
02-12 02:56:33.009: E/AndroidRuntime(1487): ... 11 more
If there is anything anyone can do to help, I would greatly appreciate it.
Your activity probably extends ListActivity and because of this in your xml file containing the layout of your activity(the one you set with setContentView(R.layout.name_of_layout)) you must have a ListView element with the id:
<ListView android:id="#android:id/list"
//other attributes
>

Android Map Application : i cant run

02-06 14:08:29.678: W/dalvikvm(702): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
02-06 14:08:29.718: E/AndroidRuntime(702): FATAL EXCEPTION: main
02-06 14:08:29.718: E/AndroidRuntime(702): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{nhexia.pack/nhexia.pack.SaturnVTDActivity}: java.lang.ClassNotFoundException: nhexia.pack.SaturnVTDActivity
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.ActivityThread.access$600(ActivityThread.java:123)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.os.Handler.dispatchMessage(Handler.java:99)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.os.Looper.loop(Looper.java:137)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.ActivityThread.main(ActivityThread.java:4424)
02-06 14:08:29.718: E/AndroidRuntime(702): at java.lang.reflect.Method.invokeNative(Native Method)
02-06 14:08:29.718: E/AndroidRuntime(702): at java.lang.reflect.Method.invoke(Method.java:511)
02-06 14:08:29.718: E/AndroidRuntime(702): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-06 14:08:29.718: E/AndroidRuntime(702): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-06 14:08:29.718: E/AndroidRuntime(702): at dalvik.system.NativeStart.main(Native Method)
02-06 14:08:29.718: E/AndroidRuntime(702): Caused by: java.lang.ClassNotFoundException: nhexia.pack.SaturnVTDActivity
02-06 14:08:29.718: E/AndroidRuntime(702): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
02-06 14:08:29.718: E/AndroidRuntime(702): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-06 14:08:29.718: E/AndroidRuntime(702): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
02-06 14:08:29.718: E/AndroidRuntime(702): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
02-06 14:08:29.718: E/AndroidRuntime(702): ... 11 more
i got this error when im run my application.... help
Check your manifest file to make sure that the activity nhexia.pack.SaturnVTDActivity is declared correctly.
Its also possible that you updated the ADT plugin and need to move your includes around as this link suggests.
It seems that you try to launch a class which cannot be found. Is the activity defined in the manifest, is the class misspelled?
Try debug in eclipse and see what line it fails on, and share that in here.

Problems with Gallery Activity

Ive follow the tutoria about how to make activity Gallery on [android-developer][1]
[1]: http://developer.android.com/guide/tutorials/views/hello-gallery.html but i got the next error:
02-12 17:54:06.221: ERROR/AndroidRuntime(1330): Uncaught handler: thread main exiting due to uncaught exception
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.addsensor.CameraMap/com.addsensor.CameraMap.GalleryCamera}: java.lang.NullPointerException
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.os.Handler.dispatchMessage(Handler.java:99)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.os.Looper.loop(Looper.java:123)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.ActivityThread.main(ActivityThread.java:3948)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at java.lang.reflect.Method.invokeNative(Native Method)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at java.lang.reflect.Method.invoke(Method.java:521)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at dalvik.system.NativeStart.main(Native Method)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): Caused by: java.lang.NullPointerException
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at com.addsensor.CameraMap.GalleryCamera.onCreate(GalleryCamera.java:20)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
02-12 17:54:06.301: ERROR/AndroidRuntime(1330): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
I have also change one thing which someone comment here, on [stackoverflow][1]
[1]: Android Hello, Gallery tutorial -- "R.styleable cannot be resolved" but i am still getting the error. Its a simple activity and i dont know how to follow. Anyone knows?¿ or how to fix it?¿
thanks
You are trying to use a reference to null (e.g. variable uninitialized, etc..) in CameraMap.GalleryCamera,onCreate() method, line 20.
Please post code for this method (and indicate line number 20).

Categories

Resources