NDK is missing a "platforms" directory. 问题解决

问题描述

NDK is missing a “platforms” directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\DJZHAO\Workspace\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

问题原因

  1. 使用了NDK,但是NDK没有配置
  2. 没有使用NDK,这是Gradle2.3.X的BUG

解决

  1. 安装NDK
    在AndroidStudio中打开SDK Manager
    切换至SDK Tools标签页
    勾选NDK选项进行NDK安装

  2. 切换Gradle plugin版本
    build.gradle中找到如下行

    classpath 'com.android.tools.build:gradle:2.3.3'
    

    切换版本号

你可能感兴趣的:(Android,Gradle,gradle,AndroidStudio,NDk)