升級Android Studio之後舊專案"No toolchains found in the NDK toolchains folder for ABI"


升級Android Studio 3.2.1之後舊專案沒有用到NDK也會跑出
"No toolchains found in the NDK toolchains folder for ABI..."

網路上有很多解法,比較前面都是要你去下載舊版的NDK完整包,再改Project的NDK路徑過去,但是我專案都沒用到NDK幹嘛載回來改路徑??

另一種是改project的build.gradle,只要將gradle版本改成新版(和AS版本對應)就沒事了
AS 3.2.1用
        classpath 'com.android.tools.build:gradle:3.2.1'
AS 3.3用
        classpath 'com.android.tools.build:gradle:3.3.0'

ref:http://www.qingpingshan.com/rjbc/az/398486.html
ref:https://hk.saowen.com/a/aecfec7ee76a9aa1261fe479e5ea7565b8f628ebcceec989ac20c2fc7f265e48

另外因為gradle tool升級所以gradle版本也要升級,所以打開gradle\wrapper\gradle-wrapper.properties修改distributionUrl

AS 3.2.1用gradle tool版本4.6
        distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
AS 3.3使用gradle tool版本是4.10.1
        distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip


在build-tools比較後面的版本會順便寫建議修改內容
ERROR: No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
This version of the NDK may be incompatible with the Android Gradle plugin version 3.0 or older.
Please use plugin version 3.1 or newer.
Upgrade plugin to version 3.3.0 and sync project

留言