0

I've been getting java.lang.ClassNotFoundException errors ever since I updated to 21.

My apk crashes on install every time and throws the following error:

java.lang.RuntimeException: Unable to instantiate application mypackage.class:    
   java.lang.ClassNotFoundException: Didn't find class "mypackage.class" on path:  
            at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
            at android.app.ActivityThread.access$1500(ActivityThread.java:135)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5001)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)

It seems people have had similar problems like this in the past and this solution has worked for them.

I'm using android studio not Eclipse so I don't what steps to reproduce.

Libraries do not get added to APK anymore after upgrade to ADT 22

Community
  • 1
  • 1
AndroidEnthusiast
  • 6,557
  • 10
  • 42
  • 56
  • Try this out : http://examples.javacodegeeks.com/java-basics/exceptions/java-lang-classnotfoundexception-how-to-solve-class-not-found-exception/ – Naufal Oct 29 '14 at 11:58
  • 'mypackage.class' That is your default activity? review your manifest for the default class. – Robert Rowntree Oct 29 '14 at 13:49
  • @RobertRowntree its not a problem with the manifest, it compiles from another system. I think it has to do with my settings – AndroidEnthusiast Oct 29 '14 at 14:04

0 Answers0