手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >解决NDK开发中Eclipse报错Unresolved inclusion jni.h的最终解决方法(已测)
解决NDK开发中Eclipse报错Unresolved inclusion jni.h的最终解决方法(已测)
摘要:在做NDK开发过程中有时候在eclipse里会遇到其无法处理inclusion导致symbol显示错误,网上有许多方法可以解决类似“Unre...

在做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. 搞定

【解决NDK开发中Eclipse报错Unresolved inclusion jni.h的最终解决方法(已测)】相关文章:

将文件放到Android模拟器的SD卡中的两种解决方法

android通过http协议获得图片

android图库竖屏不显示status bar的解决方法

android layout XML解析错误的解决方法

Android开发之SQLite的使用方法

android开发中常用的Eclipse快捷键详细整理

基于Android中实现定时器的3种解决方法

解决在eclipse中将android项目生成apk并且给apk签名的实现方法详解

深入android中The connection to adb is down的问题以及解决方法

Android开发中遇到端口号占用问题解决方法

精品推荐
分类导航