1. 写错了load的library
java.lang.UnsatisfiedLinkError: Couldn't load hell0: findLibrary returned null
2. Android.mk文件编写错误
/jni/Android.mk:4: *** missing separator. Stop.
3. LOCAL_MODULE配置不能有扩展名
//jni/Android.mk:hello.so: LOCAL_MODULE_FILENAME must not contain a file extension
4. c或者c++的源文件名称配置错误
objs/hello/helo.o'. Stop.
5. 如果使用了错误的cpu平台
java.lang.UnsatisfiedLinkError: Couldn't load hello: findLibrary returned null
添加多cpu平台的支持 APP_ABI := armeabi armeabi-v7a x86
6. c语言方法名称错误,导致java代码无法寻找到c代码
Caused by: java.lang.UnsatisfiedLinkError: Native method not found: com.itheima.hellojni.MainActivity.helloFromC:()Ljava/lang/String;
7. 应用程序闪退
06-25 07:31:46.698: I/dalvikvm(1871): #00 pc 0008ee6d /system/lib/libdvm.so
06-25 07:31:46.698: I/dalvikvm(1871): #01 pc 000738ca /system/lib/libdvm.so
06-25 07:31:46.698: I/dalvikvm(1871): #02 pc 000739f4 /system/lib/libdvm.so
06-25 07:31:46.698: I/dalvikvm(1871): #03 pc 00038f5b /system/lib/libdvm.so
06-25 07:31:46.698: I/dalvikvm(1871): #04 pc 0003bdbd /system/lib/libdvm.so
要么就是c代码有逻辑错误
要么编码问题,中文或者空格路径
阅读(685) | 评论(0) | 转发(0) |