(轉(zhuǎn))解決"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-androi...

? ? 轉(zhuǎn)自:https://blog.csdn.net/vocanicy/article/details/83004626

????今天安裝了Android Studio 3.2,打開一個舊工程,編譯提示"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"

網(wǎng)上也有解決辦法,就是下載舊版的NDK,將其中的toolchain復(fù)制到新版的NDK中

但是感覺這種方式,不是解決的正道。

經(jīng)過對新版NDK的研究,發(fā)現(xiàn)NDK的更新記錄里有一段話

This version of the NDK is incompatible with the Android Gradle plugin

? ?version 3.0 or older. If you see an error like

? ?`No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`,

? ?update your project file to [use plugin version 3.1 or newer]. You will also

? ?need to upgrade to Android Studio 3.1 or newer.


也就是說新版本的NDK與3.0及以前舊版的Android Gradle plugin插件不兼容

其實解決方法很簡單,就是修改build.gradle中的紅字部分,改為3.1以上版本即可

dependencies {

? ? classpath 'com.android.tools.build:gradle:3.2.0'

? ? // NOTE: Do not place your application dependencies here; they belong

? ? // in the individual module build.gradle files

}

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容