Error No toolchains found in the NDK toolchains folder for ABI with prefix llvm

0 votes

I wanted to compile an open source android project (Netguard) using gradle but while doing so, I encountered this ERROR:

A problem occurred configuring project ':app'. 
> Exception thrown while executing model rule: NdkComponentModelPlugin.Rules#cre ateToolchains
  > No toolchains found in the NDK toolchains folder for ABI with prefix: llvm


I searched but didn't find anything helping. Here is the main build.gradle:

buildscript { 
      repositories { 
              jcenter() 
} 
dependencies { 
      classpath 'com.android.tools.build:gradle-experimental:0.6.0-alpha1' 
    } 
} 
allprojects { 
    repositories { 
          jcenter() 
        } 
} 
task clean(type: Delete) { 
        delete rootProject.buildDir 
}

And here is the build.gradle of the app project:

apply plugin: 'com.android.model.application' 

model { 
          android { 
                compileSdkVersion = 23 
                buildToolsVersion = "23.0.2" 

                defaultConfig.with { 
                        applicationId = "eu.faircode.netguard" 
                        minSdkVersion.apiLevel = 21 
                        targetSdkVersion.apiLevel = 23 
                        versionCode = 2016011801 
                        versionName = "0.76" 
                      archivesBaseName = "NetGuard-v$versionName-$versionCode" 
                } 
} 
android.ndk { 
        moduleName = "netguard" 
        toolchain = "clang" 
        ldLibs.add("log") 
} 
android.sources { 
      main { 
              jni { 
                  source { 
                        srcDir "src/main/jni/netguard" 
                    }
                    exportedHeaders { 
                }  
              }
          } 
      } 
      android.buildTypes { 
              release { 
                    minifyEnabled = true 
                    proguardFiles.add(file('proguard-rules.pro')) 
                    ndk.with { 
                            debuggable = true 
                } 
            } 
        } 
        android.buildTypes { 
                debug { 
                        ndk.with { 
                              debuggable = true 
                } 
          } 
      } 
    android.productFlavors { 
            create("all") { 
      } 
    } 
} 

dependencies { 



compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.+'                 compile 'com.android.support:recyclerview-v7:23.1.+' 
compile 'com.squareup.picasso:picasso:2.5.+' 

}

And I'm using gradle-2.9-all and android-ndk-r10e. I don't know if I should mention anything else, so could I please get some help?

Feb 11, 2022 in Others by Rahul
• 9,670 points
2,789 views

1 answer to this question.

0 votes

Over two years has passed, now and you may possibly encountered 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


The solution would be to upgrade android gradle plugin to 3.1 or an even latest version
 

For example:-  Add following in the project level gradle
 

classpath "com.android.tools.build:gradle:3.2.0"

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

answered Feb 11, 2022 by Soham
• 9,700 points

Related Questions In Others

0 votes
1 answer
0 votes
1 answer

Ceon SEO URl gives the error page not found in zen cart

in the admin section there is  an ...READ MORE

answered Feb 18, 2022 in Others by narikkadan
• 63,420 points
273 views
0 votes
0 answers

Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm

I tried to use Gradel (gradlew clean ...READ MORE

Sep 21, 2022 in Android by Edureka
• 13,620 points
221 views
0 votes
1 answer

Invoke-customs are only supported starting with android 0 --min-api 26

After hours of working on this probleme, ...READ MORE

answered Feb 16, 2022 in Others by Soham
• 9,700 points
2,847 views
0 votes
1 answer

Android - VPN at the native layer

If it's doable in Java, it's also ...READ MORE

answered Feb 24, 2022 in Cyber Security & Ethical Hacking by Edureka
• 13,620 points
450 views
0 votes
1 answer

Exception : AAPT2 error: check logs for details

This happens when one of your .xml ...READ MORE

answered May 1, 2022 in Other DevOps Questions by narikkadan
• 63,420 points
488 views
0 votes
1 answer

The uploaded file exceeds the upload_max_filesize directive in php.ini error while uploading plugin

After looking at your ERROR, it seems ...READ MORE

answered Feb 8, 2022 in Others by Soham
• 9,700 points
493 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP