eclipse导入android studio时一些异常的处理

时间:2023-03-09 02:01:23
eclipse导入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.

提示这个错误的:

1,在项目gradle或local.properties中添加

android.useDeprecatedNdk=true

2,在app的build.gradle中添加

android

  buildTypes

sourceSets {
main {
jni.srcDirs = []
}
}

或与buildTypes同级再添加

splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a','x86_64'
universalApk true
}
}