【android】NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
2015-03-25 17:43
966 查看
今天在编译android NDK工程的时候,在jni文件夹下的cpp文件中报了一大堆错误,诸如:Unresolved inclusion: <jni.h>、Type 'jint' could not be resolved、Type 'jintArray' could not be resolved等,根据经验,这样的错误肯定是没有包含相应的头文件导致的。
解决方案:
选中工程,右键->Properties,点击C/C++ General展开,点击Path and Symbols,在右边Includes下,点击Add,把NDK文件夹下的jni头文件和相应的C++头文件添加进来。一定要填写完整的路径,比如我添加的两个路径分别是:
E:\AndroidNDK\android-ndk-r10c\toolchains\mipsel-linux-android-4.8\prebuilt\windows-x86_64\lib\gcc\mipsel-linux-android\4.8\include
E:\AndroidNDK\android-ndk-r10c\platforms\android-19\arch-arm\usr\include
如下图所示:
大家在自己的NDK文件安装目录下参照我的路径找到相应的include文件夹,添加包含路径,再重新编译,就不会报错了。
转自http://blog.csdn.net/u013149325/article/details/40371873?utm_source=tuicool
解决方案:
选中工程,右键->Properties,点击C/C++ General展开,点击Path and Symbols,在右边Includes下,点击Add,把NDK文件夹下的jni头文件和相应的C++头文件添加进来。一定要填写完整的路径,比如我添加的两个路径分别是:
E:\AndroidNDK\android-ndk-r10c\toolchains\mipsel-linux-android-4.8\prebuilt\windows-x86_64\lib\gcc\mipsel-linux-android\4.8\include
E:\AndroidNDK\android-ndk-r10c\platforms\android-19\arch-arm\usr\include
如下图所示:
大家在自己的NDK文件安装目录下参照我的路径找到相应的include文件夹,添加包含路径,再重新编译,就不会报错了。
转自http://blog.csdn.net/u013149325/article/details/40371873?utm_source=tuicool
相关文章推荐
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译时出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译时出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni.h>的解决办法
- android NDK开发编译C++文件出现Type 'jint' could not be resolved和Unresolved inclusion: <jni...
- JNI在eclipse中出现Unresolved inclusion: <jni.h>或Type 'jint' could not be resolved等解决方法
- eclipse android ndk 提示Type 'JNIEnv' could not be resolved 等信息解决办法
- 【android】解决NDK开发中的 Method 'NewStringUTF' could not be resolved
- android jni eclipse中出现Type XXX could not be resolved解决办法
- 在eclipse中出现Type 'xxxx' could not be resolved的解决办法
- [ndk]Type 'size_t' could not be resolved 我的解决方法
- android--jni编译错误的解决方案:.c源文件出现类似Type 'jstring' could not be resolved
- 解决NDK开发中的 Method 'NewStringUTF' could not be resolved
- NDK :Type 'xxx' could not be resolved解决
- eclipse中出现Type 'xxxx' could not be resolved的处理方法
- window平台下 Eclipse Ndk开发中的Method 'NewStringUTF' could not be resolved问题
- the type List is not generic; it cannot be parameterized with arguments<T>解决办法