Two years has passed, now if you come across here, you may possibly encounterd error message like this:
No toolchains found in the NDK toolchains folder for ABI with prefix mips64el-linux-android
or
No toolchains found in the NDK toolchains folder for ABI with prefix mipsel-linux-android
Latest NDK removed support for mips
abi, and earler version of android gradle plugin still check for the existance of mips toolchain. see here for more info.
Solution: Upgrade android gradle plugin to 3.1 or newer.
e.g. Add following in the project level gradle [28-Sept-2018]
classpath "com.android.tools.build:gradle:3.2.0"
Workaround: Create mipsel-linux-android
folder structure to fool the tool. The easiest way would be to symbolic link to aarch64-linux-android-4.9
.
# on Mac
cd ~/Library/Android/sdk/ndk-bundle/toolchains
ln -s aarch64-linux-android-4.9 mips64el-linux-android
ln -s arm-linux-androideabi-4.9 mipsel-linux-android
Check this thread of three options for solving this kind of issue
I fixed this Error by uninstalling the NDK in the SDK-Tools. So, if you don't need the NDK, uninstall it.
Upgrade your Gradle Plugin
classpath 'com.android.tools.build:gradle:3.2.1'
If you are now getting this error:
Could not find com.android.tools.build:gradle:3.2.1.
just add google()
to your repositories, like this:
repositories {
google()
jcenter()
}
I have faced the same problem while update Android studio from 2.0 to 2.1 in my Windows 8 machine.
I found a solution for that.Please use the following steps.
This is happening because Android studio won't gets full NDK update in the stable channel. If you are not using NDK for your project development you can simply remove the NDK folder from your SDK directory.
Error message:
No toolchains found in the NDK toolchains folder for ABI with prefix: llvm.
After fresh web installation of Android Studio with NDK, I imported an Android code sample that used NDK from GitHub and tried to compile it.
As a result had an Error:
No toolchains found in the NDK toolchains folder for ABI with prefix: llvm
Solution: for some reasons standard installation process on macOS had failed to install a complete set:
~/Library/Android/sdk/ndk-bundle
had missed folder toolchains
with all tools,
(it should be like this: ~/Library/Android/sdk/ndk-bundle/toolchains
)
The solution was to download NDK separately, open it, copy folder toolchain
and paste it to the folder:
~/Library/Android/sdk/ndk-bundle
Step-by-step:
1) Open the page with old NDK versions:
https://developer.android.com/ndk/downloads/older_releases
2) Agree the Terms:
3) Download the older version of NDK
(for example 16b):
4) Open your toolchains
directory.
5) Transfer files that you need from toolchains
folder of downloaded zip-file to your toolchains
folder:
6) Rebuild the Project:
UPD 30 Sep 2018:
I used Android NDK Revision r16b for fix this error in my own case. So I present the example with this version.
But it's better to use the Android NDK, Revision r17c (June 2018). It is the last one, supporting mips (reasonable reccomendation from Weekend's comment).
Without downloading, copying, or symlinking anything, I was able to "fix" the error by simply creating an empty directory where the older version of the Android Gradle plugin expects the removed mips toolchain:
mkdir -p $ANDROID_HOME/ndk-bundle/toolchains/mips64el-linux-android/prebuilt/linux-x86_64
Obviously, $ANDROID_HOME
points to the root of the Android SDK installation here. If you are using MacOS, replace linux-x86_64
with darwin-x86_64
in the command above. On Windows use windows-x86_64
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With