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'
    

    切換版本號

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章