0

我使用 JNI 和 NDK 创建了一个 android 项目。在运行时,我没有收到任何编译时错误,而是在 logcat 中收到了一些错误,并且我的模拟器显示如上所述..

日志猫:

01-21 12:27:12.077: D/dalvikvm(1570): Not late-enabling CheckJNI (already on)
01-21 12:27:12.117: E/Trace(1570): error opening trace file: No such file or directory (2)
01-21 12:27:12.117: D/AndroidRuntime(1570): Shutting down VM
01-21 12:27:12.117: W/dalvikvm(1570): threadid=1: thread exiting with uncaught exception (group=0xb2fd6288)
01-21 12:27:12.117: E/AndroidRuntime(1570): FATAL EXCEPTION: main
01-21 12:27:12.117: E/AndroidRuntime(1570): java.lang.RuntimeException: Unable to instantiate application com.samplendk.SampleNDK: java.lang.ClassNotFoundException: com.samplendk.SampleNDK
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.LoadedApk.makeApplication(LoadedApk.java:501)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4124)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.ActivityThread.access$1300(ActivityThread.java:130)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.os.Looper.loop(Looper.java:137)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.ActivityThread.main(ActivityThread.java:4745)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at java.lang.reflect.Method.invokeNative(Native Method)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at java.lang.reflect.Method.invoke(Method.java:511)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at dalvik.system.NativeStart.main(Native Method)
01-21 12:27:12.117: E/AndroidRuntime(1570): Caused by: java.lang.ClassNotFoundException: com.samplendk.SampleNDK
01-21 12:27:12.117: E/AndroidRuntime(1570):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.Instrumentation.newApplication(Instrumentation.java:967)
01-21 12:27:12.117: E/AndroidRuntime(1570):     at android.app.LoadedApk.makeApplication(LoadedApk.java:496)
01-21 12:27:12.117: E/AndroidRuntime(1570):     ... 11 more

请解决我的问题??

4

0 回答 0