编译.cpp文件的时候出现了Unresolved inclusion: <jni.h>、Type 'jint' could not be resolved、Type 'jintArray' could not be resolved这些错误。经查询资料,解决方法如下:
在工程的C/C++ General->Path and Symbols中,把NDK文件夹下的jni头文件和相应的C++头文件添加进来。
我添加的两个路径:
/home/qihl/work/Android/android-ndk/android-ndk-r10e/toolchains/mipsel-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/mipsel-linux-android/4.9/include
/home/qihl/work/Android/android-ndk/android-ndk-r10e/platforms/android-19/arch-arm/usr/include