views:

157

answers:

4

I have created and published my first android app. It's very simple. It works fine on simulator and some phones, but I am getting this error:

java.lang.RuntimeException: Unable to instantiate application cz.teamnovak.droid.Novak ESC Track guide: java.lang.ClassNotFoundException: cz.teamnovak.droid.Novak ESC Track guide in loader dalvik.system.PathClassLoader[/data/app/cz.teamnovak.droid-1.apk]
    at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:649)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4232)
    at android.app.ActivityThread.access$3000(ActivityThread.java:125)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4627)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: cz.teamnovak.droid.Novak ESC Track guide in loader dalvik.system.PathClassLoader[/data/app/cz.teamnovak.droid-1.apk]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
    at android.app.Instrumentation.newApplication(Instrumentation.java:942)
    at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644)
    ... 11 more

Any idea what can cause this?

A: 

Well you have a java.lang.ClassNotFoundException. That means a class is missing in the application runtime. You should check wheather you have added all your libs to the build path.

Right click on your project -> properties -> java build path -> libraries, add your libs or create one containing your classes and enable order export for your libs.

ArtWorkAD
A: 

Hello

well, I have exported by eclipse and I dont see any classes or jars inside. och, it does not work this export.... I have to find out why

Thank you, Skoky.

A: 

Well, there is file classes.dex. It should contain compiled code. Right? The file is there. So why do I get ClassNotFoundException?

Skoky.

A: 

Hello,

one more cosideration. The error says "java.lang.ClassNotFoundException: cz.teamnovak.droid.Novak ESC Track guide" -> the problem is I dont have such a class. Its somehow mixed up. The "Novak ESC Track guide" is name of the application.

Pleas advice whats going on.

Thank you, Skoky.

Something is trying to use your app name as a class name. That's not going to work.
fadden