如何修复NoClassDefFoundError - Android Eclipse

时间:2014-12-17 20:20:35

标签: java android eclipse terminal

我正在尝试在我的项目中嵌入android终端模拟器项目,但我总是遇到NoClassDefFoundError错误。我已经添加了jackpal_androidterm_emulator.jar,但错误保持不变。

顺便说一下,我不知道我会在Manifest中添加什么代码,我只需添加

<activity name=".Term"></activity>

我还能做什么?请帮我。谢谢!

12-18 04:14:52.490: E/AndroidRuntime(2044): FATAL EXCEPTION: main
12-18 04:14:52.490: E/AndroidRuntime(2044): java.lang.NoClassDefFoundError: jackpal.androidterm.Term
12-18 04:14:52.490: E/AndroidRuntime(2044):     at com.example.ttg.fragment.LinuxCommands.onListItemClick(LinuxCommands.java:91)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.app.ListFragment$2.onItemClick(ListFragment.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.widget.AdapterView.performItemClick(AdapterView.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.widget.AbsListView.performItemClick(AbsListView.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.widget.AbsListView$PerformClick.run(AbsListView.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.widget.AbsListView$1.run(AbsListView.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.os.Handler.handleCallback(Handler.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.os.Handler.dispatchMessage(Handler.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.os.Looper.loop(Looper.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at android.app.ActivityThread.main(ActivityThread.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at java.lang.reflect.Method.invokeNative(Native Method)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at java.lang.reflect.Method.invoke(Method.java:511)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
12-18 04:14:52.490: E/AndroidRuntime(2044):     at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:0)

首先尝试清理您的项目。如果这不能解决问题那么:

来自:项目 - &gt;属性 - &GT; Java构建路径 - &gt;订单&amp;导出的。检查项目的所有Android私有库并再次清理项目。

N.B。关于错误On JavaCodeGeeks

的简介