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

前端 未结 30 2453
猫巷女王i
猫巷女王i 2020-11-27 09:45

I want to compile an open source android project (Netguard) using gradel (gradlew clean build) But I encountered this Error:

A problem occurred          


        
相关标签:
30条回答
  • 2020-11-27 10:05

    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.

    1. Download the android NDK for windows from https://developer.android.com/ndk/downloads/index.html.
    2. Extract the same and copy the "toolchain" folder from the bundle.
    3. Paste the folder under installed NDK folder under C:\android-sdk-win\ndk-bundle.[Installed the path may vary based on your installation]
    4. Restart android studio.

    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.

    0 讨论(0)
  • 2020-11-27 10:06

    [https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android][1]

    For people trying out this example and facing issues with latest NDK. Can follow this solution. In build.gradle change this

    classpath 'com.android.tools.build:gradle:3.0.1'
    

    To

    classpath 'com.android.tools.build:gradle:3.1.2'
    

    The reason is mips are deprecated in the latest ndk versions, Gradle version 3.1.2 will not have a compulsion for mips. It assumes the presence for these missing folders.

    0 讨论(0)
  • 2020-11-27 10:07

    For Android Studio 3.2.1 Update your

    Gradle Version 4.6

    Android plugin version 3.2.1

    0 讨论(0)
  • 2020-11-27 10:08

    In my case, this error occured when creating a new Android Studio (Android studio 3.2.1) Java Project with

        classpath 'com.android.tools.build:gradle:2.0.0-beta6'
    

    So I´ve downgraded to

           dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
          }
    

    Not the best solution stay at an older version, but maybe it´s just a temporary bug in the beta as the NDK path in local.properties is still the same, but the IDE doesn´t complain anymore

    0 讨论(0)
  • 2020-11-27 10:09

    The simple solution is download and extract the following file which contains mips64el-linux-android-4.9 and mipsel-linux-android-4.9 folders,to your toolchains folder inside sdk "android-sdk\ndk-bundle\toolchains".

    Downlod this file and extraxt to toolchains foolder

    0 讨论(0)
  • 2020-11-27 10:10

    In your project level Gradle file increase the dependencies classpath version low to high like

    dependencies {
            classpath 'com.android.tools.build:gradle:3.0.0'
        }
    

    to change like

    dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
        }
    
    0 讨论(0)
提交回复
热议问题