Android classloader error - how to debug these?
<p>I was happily programming and debugging along in some Android demo application that I am developing but suddenly I am completely blocked, because the application does not even start any more.</p>

<p>I keep getting the following error trace:</p>

<pre><code>04-08 16:30:33.805: I/Process(367): Sending signal. PID: 367 SIG: 9
04-08 16:30:53.806: D/AndroidRuntime(378): Shutting down VM
04-08 16:30:53.806: W/dalvikvm(378): threadid=1: thread exiting with uncaught exception (group=0x40015560)
04-08 16:30:53.876: E/AndroidRuntime(378): FATAL EXCEPTION: main
04-08 16:30:53.876: E/AndroidRuntime(378): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{mmo.application.demo/mmo.application.demo.activities.DisplayLists}: java.lang.ClassNotFoundException: mmo.application.demo.activities.DisplayLists in loader dalvik.system.PathClassLoader[/data/app/mmo.application.demo-2.apk]
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.os.Looper.loop(Looper.java:123)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.ActivityThread.main(ActivityThread.java:3683)
04-08 16:30:53.876: E/AndroidRuntime(378):  at java.lang.reflect.Method.invokeNative(Native Method)
04-08 16:30:53.876: E/AndroidRuntime(378):  at java.lang.reflect.Method.invoke(Method.java:507)
04-08 16:30:53.876: E/AndroidRuntime(378):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-08 16:30:53.876: E/AndroidRuntime(378):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-08 16:30:53.876: E/AndroidRuntime(378):  at dalvik.system.NativeStart.main(Native Method)
04-08 16:30:53.876: E/AndroidRuntime(378): Caused by: java.lang.ClassNotFoundException: mmo.application.demo.activities.DisplayLists in loader dalvik.system.PathClassLoader[/data/app/mmo.application.demo-2.apk]
04-08 16:30:53.876: E/AndroidRuntime(378):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-08 16:30:53.876: E/AndroidRuntime(378):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-08 16:30:53.876: E/AndroidRuntime(378):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-08 16:30:53.876: E/AndroidRuntime(378):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
04-08 16:30:53.876: E/AndroidRuntime(378):  ... 11 more
</code></pre>

<p>I.e. this isn't even in my code, yet, but still while loading (and thus before starting) my application. What is this ComponentInfo activity that the error message is talking about doing?</p>

<p>Any ideas on this? What I don't get at all is, that the loader talks about a file ".../demo-2.apk" (instead of demo.apk), that it isn't finding. Any idea, where this "-2" is coming from? I suspect that to be the issue, but have no idea, what's going on here. I didn't change anything re. program or executable names or anything similar before I got that.</p>

<p>I have terminated and restarted eclipse as well as the emulator, but that didn't help. I still keep getting this error message.</p>

<p>Michael</p>
