Android Studio 中的 NDK 集成错误 [英] NDK Integration in Android Studio Error
问题描述
我使用的是 Android Studio 1.3.1 版并尝试通过转到 local.proprties 并编写 ndk.dir= 来集成 NDK,但出现此错误
I am using Android studio version 1.3.1 and try to integrate the NDK by going to local.proprties and writing ndk.dir= and I got this error
错误:任务 ':tesstwo:compileReleaseNdk' 执行失败.
Error:Execution failed for task ':tesstwo:compileReleaseNdk'.
错误:NDK 集成在当前插件中已弃用.考虑尝试新的实验性插件.详情请参见 http://tools.android.com/tech-docs/new-构建系统/gradle 实验.在 gradle.properties 中设置android.useDeprecatedNdk=true"以继续使用当前的 NDK 集成.
Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
请帮我解决这个问题.
推荐答案
将此添加到您的 build.gradle :
Add this to your build.gradle :
android{
sourceSets {
main {
jni.srcDirs = []
}
}
}
这篇关于Android Studio 中的 NDK 集成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!