未找到ICS类异常

时间:2012-08-16 13:59:11

标签: android sdk

我已经将我的android sdk更新为ics(4.1),因为我更新了我在froyo(2.3)中开发的所有旧项目给我错误像

08-16 19:16:32.284: E/AndroidRuntime(593): FATAL EXCEPTION: main
08-16 19:16:32.284: E/AndroidRuntime(593): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.abc.def/com.abc.def.defMain}: java.lang.ClassNotFoundException: com.abc.def.defMain in loader dalvik.system.PathClassLoader[/data/app/com.abc.def-1.apk]
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.os.Handler.dispatchMessage(Handler.java:99)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.os.Looper.loop(Looper.java:123)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.ActivityThread.main(ActivityThread.java:4627)
08-16 19:16:32.284: E/AndroidRuntime(593):  at java.lang.reflect.Method.invokeNative(Native Method)
08-16 19:16:32.284: E/AndroidRuntime(593):  at java.lang.reflect.Method.invoke(Method.java:521)
08-16 19:16:32.284: E/AndroidRuntime(593):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-16 19:16:32.284: E/AndroidRuntime(593):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-16 19:16:32.284: E/AndroidRuntime(593):  at dalvik.system.NativeStart.main(Native Method)
08-16 19:16:32.284: E/AndroidRuntime(593): Caused by: java.lang.ClassNotFoundException: com.abc.def.defMain in loader dalvik.system.PathClassLoader[/data/app/com.abc.def-1.apk]
08-16 19:16:32.284: E/AndroidRuntime(593):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
08-16 19:16:32.284: E/AndroidRuntime(593):  at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
08-16 19:16:32.284: E/AndroidRuntime(593):  at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-16 19:16:32.284: E/AndroidRuntime(593):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
08-16 19:16:32.284: E/AndroidRuntime(593):  ... 11 more

在更新sdk之前,所有这些都在没有任何错误的情况下运行,请帮助

1 个答案:

答案 0 :(得分:0)

我得到了这个Exception的解决方案这个问题正在发生,因为我在我的项目中使用外部库并在构建路径中重新设置它们但是在ics中,库应该包含在项目的libs目录中,以便我在libs中复制库问题得到解决