导入外部jar后的NoClassDefFoundError [英] NoClassDefFoundError after importing an external jar

查看:142
本文介绍了导入外部jar后的NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

导入JSoup后,每次运行第一行Jsoup代码时,应用程序都会给我这个

After importing JSoup, everytime the first line of Jsoup code is run, the app gives me this

09-16 16:43:22.567: E/AndroidRuntime(1085): FATAL EXCEPTION: main
09-16 16:43:22.567: E/AndroidRuntime(1085): java.lang.NoClassDefFoundError: org.jsoup.Jsoup
09-16 16:43:22.567: E/AndroidRuntime(1085):     at me.masterejzz.testapp.StartingPoint$1.onEditorAction(StartingPoint.java:55)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at android.widget.TextView.onEditorAction(TextView.java:4185)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at com.android.internal.widget.EditableInputConnection.performEditorAction(EditableInputConnection.java:138)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:297)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:77)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at android.os.Handler.dispatchMessage(Handler.java:99)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at android.os.Looper.loop(Looper.java:137)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at android.app.ActivityThread.main(ActivityThread.java:5103)
09-16 16:43:22.567: E/AndroidRuntime(1085):     at java.lang.reflect.Method.invokeNative(Native Method)

我已经对此主题进行了大量研究,并且没有一个修复程序对我有用,比如lib文件夹,更改顺序和导出和许多其他人。
任何帮助将不胜感激。

I have heavily researched this topic, and none of the fixes work for me like the lib folder thing, changing the order and export and many others. Any help would be appreciated.

Classpath:

Classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con"            path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con"     path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry exported="true" kind="lib" path="libs/jsoup-1.7.2.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>


推荐答案

Go to Eclipse -> 
      right click on your Project ->
                       "Properties" ->
                          "Java Build Path" ->
                              "Order and Export" Tab

检查所有带有附加罐的盒子。

There check all boxes with attached jars.

有时之后,可能需要清除 + 刷新您的项目

Sometimes after, may need clear + refresh your project

希望它会对你有帮助,

这篇关于导入外部jar后的NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆