Android Studio版本:Android Studio 2.2
系统: win10 64 专业版
NDK版本:android-ndk-r14b(自己下载安装)、android-ndk-r12b-windows-x86_64(自己下载安装)、ndk-bundle(Android Studio中下载)3者均测试有效
根据网上的教程,有时候会出现如下的错误:
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 "$USE_DEPRECATED_NDK=true" in gradle.properties to continue using the current NDK integration.
解决的方法是在gradle.properties文件中添加一行代码:
android.useDeprecatedNdk