Error: Your project contains C++ files but it is not using a supported native build system

First add a sentence at the end of the gradle.properties file in the project directory: Android.useDeprecatedNdk=true  As shown in the
figure: 
write picture description here 
Then add a method like this to the buildTypes class in the file build.gradle(Module:app)

sourceSets {
    main {
        jni.srcDirs = []
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5

As shown below 
write picture description here

This will compile successfully

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325806464&siteId=291194637