在Windows平台下使用AndroidStudio开发时,在引用 jni文件时报如下错误
错误提示:
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.
解决办法:
在app的build.gradle的android内加入如下代码:
sourceSets.main {
jni.srcDirs = []
}