Trouble with Library after ADT/Eclipse upgrade
I recently upgraded my eclipse installation to Juno and installed the latest android ADT, and now when I try to compile one of my older applications I get a problem.
I haven't changed any code since it used to work, there are no errors in compiling the app, and I'm able to export a new APK without error.
However when I try to run it, I get a ton of warnings and errors about dead code, unable to find class, unable to resolve method in my Jsoup library, like the following:
09-08 20:23:26.006: I/dalvikvm(24213): Could not find method org.jsoup.Jsoup.parse, referenced from method com.myapp 09-08 20:23:26.006: W/dalvikvm(24213): VFY: unable to resolve static method 557: Lorg/jsoup/Jsoup;.parse (Ljava/lang/String;)Lorg/jsoup/nodes/Document; 09-08 20:23:26.006: D/dalvikvm(24213): VFY: replacing opcode 0x71 at 0x0047 09-08 20:23:26.006: D/dalvikvm(24213): VFY: dead code 0x004a-0059 in Lcom/karwosts/PortfolioMap/GoogleFinance;.SendHttpRequest (Ljava/lang/String;Ljava/lang/String;)Lorg/jsoup/nodes/Document; 09-08 20:23:26.006: W/dalvikvm(24213): VFY: unable to find class referenced in signature (Lorg/jsoup/nodes/Document;) 09-08 20:23:26.006: W/dalvikvm(24213): VFY: unable to find class referenced in signature (Lorg/jsoup/nodes/Document;)
and as soon as my app calls a Jsoup method it dies with
09-08 20:23:28.566: E/AndroidRuntime(24213): FATAL EXCEPTION: IntentService[com.myapp] 09-08 20:23:28.566: E/AndroidRuntime(24213): java.lang.NoClassDefFoundError: org.jsoup.Jsoup
Another problem is that the new APK I export is 77kb, where my old APK used to be 199kb, so it seems like there's a big chunk of something missing.
I cleaned the project, I tried deleting the project from workspace and creating new project from existing code, and it didn't help. I've tried changing Java compiler version to 1.5 or 1.6 or 1.7 and it didn't help.
This is my build path library settings:
Order and export:
Any ideas what might have broken would be appreciated. I'm using Android SDK 20.0.3
The JSoup library has to be included in the project (hence the diminished filesize). By going to the Build Path settings, Order and Export tab, you can tick the checkbox next to the JSoup library to ensure that it is included in the project when you export it. Make sure to clean and rebuild after doing this.