oClassDefFoundError在AndroidRunti

oClassDefFoundError在AndroidRunti

本文介绍了如何解决的NoClassDefFoundError在AndroidRuntime错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个github上的Andr​​oid项目:ebookdroid。我导入code在Eclipse中,我选择了NDK路径编译C和CPP文件。一旦完成没有错误。我在我的设备上运行的项目,并在日志中有java.lang.NoClassDefFoundError的。

I'm working on a github android project: ebookdroid. I import the code in eclipse, I select the NDK path for compile the c and cpp files. Once finished there are no errors. I run project on my device and in the log there is java.lang.NoClassDefFoundError.

06-14 11:25:57.806: E/AndroidRuntime(16523): FATAL EXCEPTION: main
06-14 11:25:57.806: E/AndroidRuntime(16523): java.lang.NoClassDefFoundError: org.ebookdroid.ui.library.adapters.BooksAdapter
06-14 11:25:57.806: E/AndroidRuntime(16523):    at org.ebookdroid.ui.library.RecentActivityController.beforeCreate(RecentActivityController.java:104)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at org.ebookdroid.ui.library.RecentActivityController.beforeCreate(RecentActivityController.java:1)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at org.emdev.ui.AbstractActionActivity.onCreate(AbstractActionActivity.java:93)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.Activity.performCreate(Activity.java:4469)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.ActivityThread.access$600(ActivityThread.java:127)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.os.Looper.loop(Looper.java:137)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at android.app.ActivityThread.main(ActivityThread.java:4507)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at java.lang.reflect.Method.invokeNative(Native Method)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at java.lang.reflect.Method.invoke(Method.java:511)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:978)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
06-14 11:25:57.806: E/AndroidRuntime(16523):    at dalvik.system.NativeStart.main(Native Method)
06-14 11:32:40.056: I/Process(16613): Sending signal. PID: 16613 SIG: 9

为什么这个错误?在课堂上我输入正确的软件包BooksAdapter的...有人可以告诉我,我有什么可以试试吗?对不起,我的英文不好和放大器;预先感谢您!

Why this error? In the class I import the right package of BooksAdapter...Someone can tell me what can I try?Sorry for my bad english & Thank you in advance!

推荐答案

由于您使用的图书馆,这是运行时异常。所以,只要到

Since you are using an library, and this is runtime exception. So just go to the

项目属性> Java构建路径>订购和导入标签并检查您所使用的库

看来,ADT更新22,你必须手动执行此操作:Libraries没有得到升级后,再加入APK到ADT 22

It seems that ADT update 22, you have to do this manually: Libraries do not get added to APK anymore after upgrade to ADT 22

这篇关于如何解决的NoClassDefFoundError在AndroidRuntime错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 16:54