Error: Your project contains C++ files but it is not using a supported native build system.
2017-05-08 19:45
671 查看
遇到如下的错误应该如何解决。亲测可用:
Error:Execution failed for task ':app:compileDebugNdk'.
> Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration with the stable Android Gradle plugin:
https://developer.android.com/studio/projects/add-native-code.html
or use the experimental plugin:
https://developer.android.com/studio/build/experimental-plugin.html.
首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true
如图:
然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法
2
3
4
5
1
2
3
4
5
如下图所示
这样就可以编译成功了
Error:Execution failed for task ':app:compileDebugNdk'.
> Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration with the stable Android Gradle plugin:
https://developer.android.com/studio/projects/add-native-code.html
or use the experimental plugin:
https://developer.android.com/studio/build/experimental-plugin.html.
首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true
如图:
然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法
sourceSets { main { jni.srcDirs = [] } }1
2
3
4
5
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