Android java.lang.NoClassDefFoundError: org.jsoup.Jsoup

前端 未结 8 1171
广开言路
广开言路 2020-12-01 22:12

I work with eclipse Version: Indigo Service Release 2 Build id: 20120216-1857. The Android version ist 2.2. I make an app to test a connect and parse a web site like this:

8条回答
  •  庸人自扰
    2020-12-01 22:31

    I encountered this exact problem after a recent update of the ADT component of Android. It looks like Android is ignoring the build path and instead using the ANT defaults.

    I solved this by removing my jar file from the build path, creating a folder in the "root" of the app heirarchy (alongside src, gen, etc) called "libs", and putting my .jar there. When you clean / build and re-launch the app, the error should go away.

    FYI - this is occurring because the JAR file is not getting packaged into the .apk files - this is why it builds correctly, but isn't available during run-time on your Android device.

    see NoClassDefFoundError - Eclipse and Android

提交回复
热议问题