Android模拟器显示不幸的应用程序已停止

时间:2013-01-21 07:35:49

标签: android-ndk emulation

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

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

请解决我的问题??

0 个答案:

没有答案