天天看點

Gradle sync failed: A problem occurred configuring project ‘:app‘解決方法

在terminal 中輸入 gradlew -i 檢視詳細資訊 輸出資訊:

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 D:\ProgramFile\Android

\androidsdk\ndk-bundle.

If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

NDK is missing a "platforms" directory.提示platforms不存在  重新在自己本地C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle的檔案夾内建立platforms檔案夾 重新打開AndroidStudio 編譯成功