Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android" #15

Closed
AndroidDeveloperLB opened this issue Aug 5, 2018 · 85 comments

Comments

@AndroidDeveloperLB
Copy link

I just wanted to try out the sample, but I got this error:

image

@romainguy
Copy link
Collaborator

It opens properly for me on several machines. Do you have an NDK properly installed and setup?

@AndroidDeveloperLB
Copy link
Author

Isn't this enough:

image

?

@romainguy
Copy link
Collaborator

It should be. I have no idea what the problem is here, we don't even support the MIPS ABI (and it's not part of the NDK anymore I believe).

@AndroidDeveloperLB
Copy link
Author

Is it possible that it's because I'm using Windows OS?
Or that I have AMD CPU ?

@romainguy
Copy link
Collaborator

Those have nothing to do with MIPS so I doubt they're related.

BTW did you follow the other instructions in the README and built the native libraries with cmake already? These are necessary before you can build the AAR.

@banshee
Copy link

banshee commented Aug 13, 2018

I had the same problem (a very unexpected "No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android") when I opened an old project, and fixed it by updating some build settings:

diff --git a/AndroidStudioHolder/app/build.gradle b/AndroidStudioHolder/app/build.gradle
index c42f8710..8bc8b1aa 100644
--- a/AndroidStudioHolder/app/build.gradle
+++ b/AndroidStudioHolder/app/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
 
 android {
     compileSdkVersion 26
-    buildToolsVersion '26.0.2'
+    buildToolsVersion '28.0.2'
 
     defaultConfig {
         applicationId "com.digium.SwitchvoxSoftphone"
diff --git a/AndroidStudioHolder/build.gradle b/AndroidStudioHolder/build.gradle
index 70e20276..8295018f 100644
--- a/AndroidStudioHolder/build.gradle
+++ b/AndroidStudioHolder/build.gradle
@@ -6,7 +6,7 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.1'
+        classpath 'com.android.tools.build:gradle:3.3.0-alpha05'
         classpath 'com.google.gms:google-services:3.1.0'
 
         // NOTE: Do not place your application dependencies here; they belong
diff --git a/AndroidStudioHolder/gradle/wrapper/gradle-wrapper.properties b/AndroidStudioHolder/gradle/wrapper/gradle-wrapper.properties
index 790c9505..4e61a125 100644
--- a/AndroidStudioHolder/gradle/wrapper/gradle-wrapper.properties
+++ b/AndroidStudioHolder/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Tue Sep 05 11:15:44 PDT 2017
+#Mon Aug 13 15:32:30 PDT 2018
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip

@AndroidDeveloperLB
Copy link
Author

@romainguy You are correct. I was sure it's just NDK that's needed. Seems it's a lot more.
Closing this as I don't have time for this. Sorry.
Thank you for the good work.

@stark25795
Copy link

Find your own local android-sdk, if you download the relevant sdk of ndk, there will be a folder called "ndk-bundle"

image

There is a folder called "toolchains" inside.
image

We noticed that there are no mips64el related files inside.
image

The solution is as follows:

Click here to download the NDK package separately through the browser.
After unzipping, open the "toolchains" folder, compare it with the android-sdk->ndk-bundle->toolchains folder, find the missing folder, copy the past
3. Recompile, the problem is solved.
Hope it helps you mate

@AndroidDeveloperLB
Copy link
Author

@romainguy Seems "mips64el-linux-android" is missing because it got deprecated:
https://issuetracker.google.com/issues/112810603
https://issuetracker.google.com/issues/112779429

https://developer.android.com/ndk/guides/abis#sa

Note: Historically the NDK supported 32-bit and 64-bit MIPS, but support was removed in NDK r17.

Please avoid using unsupported architectures.

@stark25795 The latest version doesn't have it, because of what I wrote above:
image

@romainguy
Copy link
Collaborator

That's why we don't support MIPS, because it's been deprecated/removed from the NDK

@AndroidDeveloperLB
Copy link
Author

@romainguy So... please remove it from the sample too :)

@romainguy
Copy link
Collaborator

It's not in the samples.

@AndroidDeveloperLB
Copy link
Author

So how did I get this error (look at first post) ?

@mimers
Copy link

mimers commented Aug 27, 2018

@AndroidDeveloperLB It seems like the old version of android gradle plugin(<3.3.+) was trying to access mips toolchain without checking if it exists. Upgrade the plugin version to 3.3-alpha may adopt to your r18-rc NDK toolchains(as @banshee posted).

@AndroidDeveloperLB
Copy link
Author

So it's a relatively new issue

@kles4enko
Copy link

for me, upgrade the Android Gradle plugin version to 3.1.3+ works.

@chris118
Copy link

@stark25795 it works for me

@AndroidDeveloperLB
Copy link
Author

@chris118 What worked? Which sample worked for you?
I think I tried them all. What did you do?

@gatschet
Copy link

For me, just remove tick NUK in SDL tools resolved the problem...

@adrianodelvigna
Copy link

adrianodelvigna commented Sep 19, 2018

@AndroidDeveloperLB, I had the same problem with another project. I followed the instructions from Android Plugin for Gradle release notes; you may try to change your Project Structure settings as (check bold for the changes):

  • Gradle version: 4.4
  • Android Plugin Version: 3.1.0
  • Android Plugin Repository: jcenter, google()
  • Default Library Repository: jcenter

image

I resync'ed Gradle then rebuilt the project successfully.

In time, here are my Android Studio details:

Android Studio 3.1.4
Build #AI-173.4907809, built on July 23, 2018
JRE: 1.8.0_152-release-1024-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.6

EDIT: If prompted to upgrade Gradle, click Upgrade button.

@AndroidDeveloperLB
Copy link
Author

On which sample?
I tried now on "hello-triangle", "image-based-lighting", and "lit-cube" , and all show this error now:

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

Thing is, it points to a correct place, so it should be fine...

image

@romainguy
Copy link
Collaborator

@AndroidDeveloperLB You need a local.properties in android/filament-android too.

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Sep 19, 2018

@romainguy It doesn't let me open the project as one with all 3 samples with filament-android , so I can't have it all :

image

Also, I think the samples don't use this, no? Should use the gradle repository instead, no?

I now tried to open each of them separately, and it still doesn't help. Tells me "module not specified", but I can't even choose the module :

image

@romainguy
Copy link
Collaborator

filament-android is a library required by each sample. Just copy your local.properties in filament-android then open a sample.

@AndroidDeveloperLB
Copy link
Author

@romainguy Copy it? Copy it to where?
As I've shown now, when I open the sample after I've opened the filament-android, it doesn't let me run anything, as it can't find the module to run. Look:

image

@romainguy
Copy link
Collaborator

Copy that file inside the filament-android directory.

@RichieDevereux
Copy link

RichieDevereux commented Oct 29, 2018

This is the solution guys it just helped me out thanks man.@RichieDevereux

I tried lots of peoples answers and ended up sorting it myself after long searching.
Frustrating when you are doing tutorials. I've had a few problems with Codelabs tuts and find a solution somehow. Il don't think I will ever need the NDK so it's gone.
Good you sorted it out.

@loulansuiye
Copy link

Is it possible that it's because I'm using Windows OS?
Or that I have AMD CPU ?

even though I compile it on ubuntu 1604 ,it still report that problem!

@smiron
Copy link

smiron commented Nov 5, 2018

@romainguy You are correct. I was sure it's just NDK that's needed. Seems it's a lot more.
Closing this as I don't have time for this. Sorry.
Thank you for the good work.

Worst argument I have ever seen to close an issue

@romainguy
Copy link
Collaborator

This comment was from the original reporter. Also note that most of the comments here have nothing to do with this project.

@newlighty
Copy link

hi tried fix some problem for this error if someone try it i commit it and tell me if it is working and for the record uninstall the ndk dose the job ask of u for some update

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Nov 9, 2018

I am using Windows, and creating the empty folders fixed the problem.
Exactly I created the following directories: \mips64el-linux-android\prebuilt\windows-x86_64
Under my $ANDROID_HOME which in my case is C:\Users\myusername\AppData\Local\Android\sdk\ndk-bundle\toolchains
I run the application again and this time no more errors.
Thanks for the help

I still got an issue with this. It says:

* What went wrong:
A problem occurred configuring project ':filament-android'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

However, all folders are actually positioned fine:

image

How come?

@kjanard
Copy link

kjanard commented Nov 14, 2018

If your old project didn't use NDK, just remove it from Android SDK Manager and reopen your project again. It work for me.

@AndroidDeveloperLB
Copy link
Author

@kjanard Which old project? I just cloned the repository here, and wanted to try out one of the samples (the triangle in this case).
And what do you mean by "remove it" ? Wouldn't this mean I won't be able to build C/C++ code in all projects?

@kjanard
Copy link

kjanard commented Nov 14, 2018

@AndroidDeveloperLB Sorry, my mistake. I didn't read an issue carefully and clearly. Your post just popped up when I search about non-ndk project.

@chrisws
Copy link

chrisws commented Nov 15, 2018

I encountered this issue with generated project files from cocos2dx.

Here's what worked for me

  1. Change this in build.gradle:
    from:
    classpath 'com.android.tools.build:gradle:3.0.0'
    to:
    classpath 'com.android.tools.build:gradle:3.2.1'

  2. Overwriting gradle* from another working project

@tomeroto
Copy link

Linux & 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

its worked! thanks

@jwu92610
Copy link

Thanks @petru-sabadac :) It worked for me with similar steps in Windows 10 as follows.

Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 8, 2018
JRE: 1.8.0_152-release-1136-b06 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Right click the "Start Icon" of Windows 10 and select "Command Prompt (Admin)", and then

mklink /D mips64el-linux-android aarch64-linux-android-4.9
mklink /D mipsel-linux-android arm-linux-androideabi-4.9

@newlighty
Copy link

newlighty commented Nov 17, 2018 via email

@prvinuch
Copy link

I just unchecked the NDK from SDK Tools and it worked for me... I think there is no need yet for NDK.

@RichieDevereux
Copy link

I just unchecked the NDK from SDK Tools and it worked for me... I think there is no need yet for NDK.

there is if you design games.

@pundirbhupendra
Copy link

i face same problem then i upgrade gradle version 3.0.1 to classpath 'com.android.tools.build:gradle:3.2.1' it work for me..

@pandaphil
Copy link

The issue can be resolved by downloading an older version of the NDK (14b) and going to Android Studio to File | Project Structure and selecting it.

@friederbluemle
Copy link

This thread just keeps growing and growing and the issue is completely unrelated to the project it's in. There are obviously multiple solutions to get rid of the error, but there is one fix that does not involve downloading or copying anything that can be seen by scrolling up to #15 (comment)

I wish there was a way to "pin" a comment and/or prevent people from commenting "me too"... Maybe this thread should be closed with a final conclusion?

@Xardas365
Copy link

i haved the same problem in cordova.

You need to edit the gradle version to the latest in this files.

platforms/android/app/build.gradle platforms/android/cordova/lib/builders/GradleBuilder.js platforms/android/cordova/lib/builders/StudioBuilder.js

In build.gradle find this part of the code.
task wrapper(type: Wrapper) { gradleVersion = '4.10.2' }

In GradleBuilder.js find this part of the code.
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.10.2-all.zip';

In StudioBuilder.js find this part of the code.
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-4.10.2-all.zip';

Source: https://stackoverflow.com/questions/49321000/minimum-supported-gradle-version-is-4-1-current-version-is-3-3/52967069#52967069

@AleksandrHovhannisyan
Copy link

Nothing here worked for me, but here are the steps I followed to fix it on my end (while trying to build the SimpleCalc project from Codelabs):

  1. Tap the Shift key twice, click Include non-project items, type "SDK", and scroll until you find SDK Manager. Click it.
  2. Go to the SDK Tools tab.
  3. Uncheck NDK and click Apply.
  4. Exit the SDK Manager when this is finished.
  5. Expand the Gradle Scripts directory of your project.
  6. Double-click on build.gradle to open a script that's executed to sync your project.
  7. Make sure your classpath is defined as follows: classpath 'com.android.tools.build:gradle:3.2.1' (or, if 3.2.1 is not the latest Gradle version when you're reading this, replace it accordingly).
  8. Find the repositories section of the script under buildscript, and make sure you add google() on a new line within the curly braces, if it does not already exist.
  9. Go to File > Sync Project with Gradle Files.

Then, Build > Make Project. If all went well, this should work for you.

@rogerkamal
Copy link

I'm still facing same issue since a long time.
Please Help. I've tried every solution above.
It still showing "No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"

@simonkuang
Copy link

Notice the file android-ndk-r17-beta2/toolchains/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/NOTICE-MIPS64. The content of the file is below.

This mips64el-linux-android-4.9 directory exists to make the NDK compatible with the Android
SDK's Gradle plugin, version 3.0.1 and earlier, which expects the NDK
to have a MIPS64 toolchain directory.

So, i can say, using Android SDK's Gradle plugin above 3.0.1, or create even a directory marked with 'mipsel' and 'mips64el', can both resolve the problem. The latter method is below.

cd <path-to-ndk>

OS_=$(uname -s | tr [A-Z] [a-z])
mkdir -p toolchains/mipsel-linux-android-4.9/prebuilt/${OS_}-x86_64
touch toolchains/mipsel-linux-android-4.9/prebuilt/${OS_}-x86_64/NOTICE-MIPS
mkdir -p toolchains/mips64el-linux-android-4.9/prebuilt/${OS_}-x86_64
touch toolchains/mips64el-linux-android-4.9/prebuilt/${OS_}-x86_64/NOTICE-MIPS64

@Md-Mahfuzur-Rahman
Copy link

buildscript {

repositories {
    google()
    jcenter()
}
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
}

}

============= Above code worked for me ===============

@google google locked as off-topic and limited conversation to collaborators Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests