0

我已将我的 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 之前,所有这些都运行得非常好,没有任何错误,请帮忙

4

1 回答 1

0

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

于 2012-08-21T10:12:55.380 回答