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

前端 未结 30 2633
猫巷女王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 09:57

    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

提交回复
热议问题