Android App Debugging: ClassNotFoundException

I made my first Android app. It works great locally. But when I bring it to the market, someone has problems with it. I can’t understand what went wrong. Even when I have a stack trace:

java.lang.RuntimeException: Unable to instantiate application com.jphellemons.koopzondag.Koopzondag: java.lang.ClassNotFoundException: com.jphellemons.koopzondag.Koopzondag in loader dalvik.system.PathClassLoader[/data/app/com.jphellemons.koopzondag-2.apk]
at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:715)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4615)
at android.app.ActivityThread.access$3000(ActivityThread.java:136)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2223)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:5068)
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: com.jphellemons.koopzondag.Koopzondag in loader dalvik.system.PathClassLoader[/data/app/com.jphellemons.koopzondag-2.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:945)
at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:706)

Please let me know if I have to show the manifest and / or source code? I really have no idea. I will update this thread if I have an answer!

I read about this problem here: java.lang.ClassNotFoundException in a working application

So, I think my mistake is setting in this window: can someone help me with this?

enter image description here

: helloandroid.java koopzondag.java, classcastexception. . ?

edit2: , : ? http://androidforums.com/application-development/216707-classcastexception-starting-activity.html#post1905263

+3
3

: android classcastexception

Maxim:

  • AndroidManifest.xml

  • application

  • android:name ( )

  • android:name="android.app.Application"

0

, /libs.

+1

If you use the Android API level higher than the phones support, you will get Runtime exceptions.

It seems you are using API level 8, have you specified the correct levels in the manifest file?

0
source

Source: https://habr.com/ru/post/1787424/


All Articles