Android Studio 错误中的 NDK 集成

NDK Integration in Android Studio Error

我正在使用 Android studio 版本 1.3.1 并尝试通过转到 local.proprties 并编写 ndk.dir= 来集成 NDK,但我遇到了这个错误

错误:任务“:tesstwo:compileReleaseNdk”执行失败。

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 :

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