Android Studio运行或Rebuild的时候报Error:Execution failed for task ':app:compileDebugNdk'.的解决办法

来源:互联网 发布:super() python 编辑:程序博客网 时间:2024/06/03 05:14

Error:Execution failed for task ':app:compileDebugNdk'.
> 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.

Android Studio运行或Rebuild的时候报Error:Execution failed for task ':app:compileDebugNdk'.的解决办法:

点击打开链接

就是在app/build.gradle中的android里面加上

sourceSets.main {    jni.srcDirs = []}

就可以了,应该是找不到NDK目录,这应该是AS的bug其实这个bug一直存在我都不知道为什么不修复。




最近我发现其实不是这个原因,只需要在项目下的gradle.properties加上这一句就可以了“android.useDeprecatedNdk=true

0 0