Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting ClassNotFound Error after updating from ADT 16 to ADT 17

Tags:

android

My Application was working fine. But as soon as i updated from ADT 16 to ADT 17 then i am getting this error

Unable to resolve superclass of Lcom/my/app/MyActivity; (130)
Link of class 'Lcom/my/app/MyActivity;' failed
D/AndroidRuntime(328): Shutting down VM
W/dalvikvm(328): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime(328): FATAL EXCEPTION: main
E/AndroidRuntime(328): java.lang.RuntimeException: Unable to instantiate activity     ComponentInfo{com.my.app/com.my.app.MyActivity}:   java.lang.ClassNotFoundException: com.my.app.MyActivity in loader   dalvik.system.PathClassLoader[/data/app/com.my.app-1.apk]
E/AndroidRuntime(328):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
E/AndroidRuntime(328):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime(328):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime(328):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(328):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(328):  at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(328):  at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(328):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(328):  at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(328):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(328):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(328):  at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(328): Caused by: java.lang.ClassNotFoundException: com.my.app.MyActivity in loader dalvik.system.PathClassLoader[/data/app/com.my.app-1.apk]
E/AndroidRuntime(328):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/AndroidRuntime(328):  at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime(328):  at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime(328):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(328):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime(328):  ... 11 more

How to resolve it?

like image 375
coderslay Avatar asked Mar 29 '12 10:03

coderslay


Video Answer


1 Answers

This issue occurs because the "lib" folder is renamed to "libs" now by Android People. And as soon as we place our external jars to this "libs" folder then it will automatically be added to the build path of the application.

like image 123
coderslay Avatar answered Sep 19 '22 09:09

coderslay