0

This morning I updated various SDK components from Eclipse. I think it was - Android SDK or Platform tools - Google APIs 17 update - Android Support Library - Google Play Services

Now, my apps won't deploy. They build ok (eventually, after an hour of reconfiguring and rebuilding) but now when I deploy to the device, I get the following:

 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

Bear in mind that this project, and others, have been happily running for months, so this isn't just some daft error like the activity missing from the manifest file.

I'm really wishing I hadn't bothered with the update now... any ideas welcome!

androidneil
  • 880
  • 1
  • 10
  • 21
  • Android private dependencies. Check this item in java build path (Order & export tab) – Blackbelt May 23 '13 at 09:19
  • this is a common error after updating ADT to latest version please check http://stackoverflow.com/questions/16585964/class-not-found-error-after-updating-adt-and-android-sdk-tools-to-latest-ver-22 – Iftikar Urrhman Khan May 23 '13 at 09:20
  • http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127 – Raghunandan May 23 '13 at 09:21
  • check this link http://stackoverflow.com/questions/16669978/android-library-dependencies-broken-after-sdk-adt-update – Nargis May 23 '13 at 09:22

2 Answers2

4

I faced this issue couple of days before.

Right click your project, Go to properties->Java Build path->Order and Export

Check Android Private Library->Click Ok

Clean the project and run it.it will work.

Shadow
  • 6,864
  • 6
  • 44
  • 93
1

sdk\extras\android\support\v4 inside there is a jar file android-support-v4.jar add this to the external jars

prvn
  • 916
  • 5
  • 5