当前位置: 移动技术网 > IT编程>移动开发>Android > 解决NDK开发中Eclipse报错Unresolved inclusion jni.h的最终解决方法(已测)

解决NDK开发中Eclipse报错Unresolved inclusion jni.h的最终解决方法(已测)

2019年07月24日  | 移动技术网IT编程  | 我要评论

贝利珠,味道2,css 居中

在做ndk开发过程中有时候在eclipse里会遇到其无法处理inclusion导致symbol显示错误,网上有许多方法可以解决类似“unresolved inclusion jni.h” 错误的方法,包括include path等方法,不过对我都不管用。

最终的解决办法就是初始化eclipse对该project的native support:

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
5. 搞定

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网