欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

创建文件时选择了c++时遇到这个错误解决方法

程序员文章站 2022-05-17 23:30:55
创建文件时选择了c++时遇到这个错误 error:executing external native build for cmake d:\dev\testcode\mayapplication\a...

创建文件时选择了c++时遇到这个错误

error:executing external native build for cmake d:\dev\testcode\mayapplication\app\cmakelists.txt

解决办法:在build.gradle?里加上下面***中间这段

android {
 compilesdkversion 25
 buildtoolsversion "28.0.0"
 defaultconfig {
  applicationid "test.a1234.com.mayapplication"
  minsdkversion 15
  targetsdkversion 25
  versioncode 1
  versionname "1.0"
  testinstrumentationrunner "android.support.test.runner.androidjunitrunner"
  externalnativebuild {
cmake {
 cppflags ""
}
  }
//*********
  ndk{
modulename "native-lib"
abifilters "x86","x86_64","armeabi-v7a","arm64-v8a"
  }
//*********
 }
 buildtypes {