NDK :Type 'xxx' could not be resolved解决

1.错误:

Unresolved inclusion: <jni.h>、Type 'jint' could not be resolved、Type 'jintArray' could not be resolved

2.原因 头文件未引入

3.解决

选择工程->propority->c/c++ General->Path and Symbols->includes->add:

1)/home/wangbin/software/tools/NDK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.8/include

2)/home/wangbin/software/tools/NDK/android-ndk-r10e/platforms/android-17/arch-arm/usr/include

参考:http://www.tuicool.com/articles/aM7f6b

http://stackoverflow.com/questions/16284199/android-ndk-in-eclipse-type-size-t-could-not-be-resolved


续:

将运行OK ndk工程导入eclipse时又发生该错误,但上述方法以及实施。

进一步解决方案:

1. 在eclipse中关闭指定Project

2. 用其他编辑工具打开该project的.project文件,删除以下内容:

......
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
......
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>

......

<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>


3. 删除.cproject文件

4. 在eclipse里打开原来的project, refresh,然后右键->properties->Android Tools -> Add Native Support


参考:http://blog.csdn.net/zhubin215130/article/details/39347873




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值