今天用Android Studio3.1.4导入一个项目,结果报错:Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration. For more information, go to:
https://d.android.com/r/studio-ui/add-native-code.html
Alternatively, you can use the experimental plugin:
https://developer.android.com/r/tools/experimental-plugin.html
这个bug比较好解决在app的build.gradle中添加如下代码即可:
sourceSets{
main {
jni.srcDirs = []
}
}
具体放置的位置如下图所示:
如果本文对你有所帮助,麻烦点击一下左侧的点赞按钮,谢谢!