我正在开发一个 github android 项目:ebookdroid。我在eclipse中导入代码,我选择NDK路径来编译c和cpp文件。完成后没有错误。我在我的设备上运行项目,日志中有 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 的正确包......有人可以告诉我我可以尝试什么吗?对不起我的英语不好,提前谢谢你!