Error: Your project contains C++ files but it is not using a supported native build system
2017-07-05 16:40
627 查看
我在导入android studio 代码的时候运行报错:
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.
这个情况是项目中使用了NDK—jni导致的配置错误,看了别人的解决方法,我的问题也解决了:
首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true
如图:
然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法
如下图所示
这样就可以编译成功了
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.
这个情况是项目中使用了NDK—jni导致的配置错误,看了别人的解决方法,我的问题也解决了:
首先在工程目录下的gradle.properties文件的末尾加上一句:Android.useDeprecatedNdk=true
如图:
然后再在文件build.gradle(Module:app)里面的buildTypes类中添加一个这样的方法
sourceSets { main { jni.srcDirs = [] } }
如下图所示
这样就可以编译成功了
相关文章推荐
- 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