eclipse的jni无法找到头文件的解决方式

最终的解决办法就是初始化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>
   
   
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

……

<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
   
   
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

……

<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>
   
   
  • 1
  • 2
  • 3
  • 4
  1. 删除.cproject文件
  2. 在eclipse里打开原来的project, refresh,然后右键->properties->Android Tools -> Add Native Support
  3. 搞定

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

猜你喜欢

转载自blog.csdn.net/liujian8654562/article/details/80003010