自从今天更新SDK工具后无法部署我的应用程序

时间:2013-05-23 09:16:50

标签: android

今天早上我从Eclipse更新了各种SDK组件。我想是的 - Android SDK或平台工具 - Google API 17更新 - Android支持库 - Google Play服务

现在,我的应用程序将无法部署。它们构建正常(最终,经过一小时的重新配置和重建)但现在当我部署到设备时,我得到以下内容:

 VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
 VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
 VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
 Unable to resolve superclass of Lcom/com/myapp/MainActivity; (81)
 Link of class 'Lcom/com/myapp/MainActivity;' failed
 VFY: replacing opcode 0x71 at 0x0006
 VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
 Unable to resolve superclass of Lcom/com/myapp/MainActivity; (81)
 Link of class 'Lcom/com/myapp/MainActivity;' failed
 Shutting down VM
 threadid=1: thread exiting with uncaught exception (group=0x40015560)
 FATAL EXCEPTION: main
 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.myapp/com.myapp.MainActivity}: java.lang.ClassNotFoundException: com.myapp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.myapp.apk]
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1680)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1784)
    at android.app.ActivityThread.access$1500(ActivityThread.java:123)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:939)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3835)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
    at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.ClassNotFoundException: com.myapp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/myapp.apk]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672)
    ... 11 more

请记住,这个项目和其他项目已经开心运行了几个月,所以这不仅仅是清单文件中遗漏的活动之类的一些愚蠢错误。

我真的希望我现在没有对更新感到困扰......欢迎任何想法!

2 个答案:

答案 0 :(得分:4)

我几天前就遇到过这个问题。

右键单击您的项目,转到属性 - > Java构建路径 - >订单和导出

检查Android私人图书馆 - >点击确定

清理项目并运行它。它将起作用。

答案 1 :(得分:1)

sdk \ extras \ android \ support \ v4里面有一个jar文件android-support-v4.jar将此添加到外部jar中