[转] java.lang.ClassNotFoundException

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.MyActivityin 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(NativeMethod)
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(NativeMethod)
E
/AndroidRuntime(328):Causedby: java.lang.ClassNotFoundException: com.my.app.MyActivityin 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?

share|improve this question

 
 
Is your Activity defined in the Manifest file properly? – Egor Mar 29 at 10:05
 
Obviously... It was working perfectly just before the update... Do u want me to paste my Manifest also? – Coder_sLaY Mar 29 at 10:06
1  
use search option!!! one more question about this and ill start killing people one the street ...stackoverflow.com/questions/9820675/… – Selvin Mar 29 at 10:09
 
Thanks Selvin....:) – Coder_sLaY Mar 29 at 10:26
 
@Selvin Can you post it as a answer? – Coder_sLaY Mar 29 at 10:52
show 3 more comments
feedback

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.


 
1  
u rock Coder_sLaY – EGL 2-101 Apr 24 at 0:09
feedback

 

posted on 2012-08-20 14:15  lightideal  阅读(930)  评论(0编辑  收藏  举报

导航