「No toolchains found in the NDK toolchains folder for ABI with prefix:mips 64 el-linux-android」エラーの解決

1040 ワード

今日Android Studio 3.2をインストールし、古いプロジェクトを開き、「No toolchains found in the NDK toolchains folder for ABI with prefix:mips 64 el-linux-android」というヒントをコンパイルしました.
ネット上にも解決策があり、旧版のNDKをダウンロードし、その中のtoolchainを新版のNDKにコピーすることです.
しかし、この方式は、解決の正道ではないような気がします.
新版NDKの研究を経て、NDKの更新記録の中で1段の話があることを発見します
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プラグインと互換性がありません
実は解決方法は簡単です.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
}