且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

安卓java.lang.NoClassDefFoundError的:org.jsoup.Jsoup

更新时间:2023-12-03 23:49:10

我最近的Andr​​oid的ADT组件的更新后遇到了这个确切的问题。它看起来像Android正在忽略构建路径,而不是使用ANT默认值。

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.

我解决了这个通过从构建路径中我的jar文件,创建了应用程序层次结构的根的文件夹(SRC旁边,根等)被称为库,并把我的.jar那里。当你清洁/构建并重新启动应用程序,错误应该消失。

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.

仅供参考 - 这是发生因为JAR文件是没有得到打包进.apk文件的文件 - 这就是为什么它建立正确的,但不可用在运行时在Android设备上

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.

看NoClassDefFoundError - Eclipse和Android的