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

前端 未结 30 2626
猫巷女王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

    First, try updating the ndk version https://developer.android.com/ndk/downloads/

    If that's not working then you can try the following:

    • Create a folder

      Go to the Sdk\ndk-bundle\toolchains folder (in my case its C:\Users\USER\AppData\Local\Android\Sdk\ndk-bundle\toolchains; you can find yours under File->project structure->SDK location in you android studio) and create a folder with the name that's shown as missing in the error for eg: if the error is

      Gradle sync failed: No toolchains found in the NDK toolchains folder for ABI with prefix: mipsel-linux-android

      Then create a folder with name mipsel-linux-android

    • Include content Go to the Sdk\ndk-bundle\toolchains folder again and open any folder that's already in it. For example:Sdk\ndk-bundle\toolchains\aarch64-linux-android-4.9 (in mycase C:\Users\USER\AppData\Local\Android\Sdk\ndk-bundle\toolchains\aarch64-linux-android-4.9) copy the prebuilt folder in it to the folder we created in the last step

    • Run the project again and it will work

    Hope it helps!!

提交回复
热议问题