Error: Your project contains C++ files but it is not using a supported native build system
2017-07-10 00:19
567 查看
我在编写有关JNI的代码的时候回报这个错误,我在网上搜了相关的资料后,找到了一篇文章解决了这个问题,点击这里查看这篇文章,我在照着这篇文章尝试的时候,总有一些错误,现在我把自己详细的解决流程贴出来,供大家参考。
首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true
如图:
然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法
2
3
4
5
如下图所示
这样就可以编译成功了
首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true
如图:
然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法
sourceSets { main { jni.srcDirs = [] } }1
2
3
4
5
如下图所示
这样就可以编译成功了
相关文章推荐
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system.
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system.
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system
- Error: Your project contains C++ files but it is not using a supported native build system
- Your project contains C++ files but it is not using a supported native build system
- [笔记]如何解决Your project contains C++ files but it is not using a supported native build system
- 如何解决Your project contains C++ files but it is not using a supported native build system
- Your project contains C++ files but it is not using a supported native build system.
- Eclipse项目转AndroidStudio报错:Your project contains C++ files but it is not using a supported native...
- Error:Execution failed for task ':app:compileDebugNdk'. > Error: Your project contains C++ files but
- JAVA Error:The project was not built since its build path is incomplete. Cannot find the class file for java.util.Map$Entry.....
- JAVA Error:The project was not built since its build path is incomplete. Cannot find the class file for java.util.Map$Entry.....
- The project was not built since its build path is incomplete. Cannot find the class file for java.la
- Eclipse build error 解决方法The library '*.jar' contains native libraries that will not run on the dev