Search code examples
android-ndkandroid-studio-2.1

Android studio 2.1 Unable to find toolchain of ndk-bundle


After upgrade to Andriod studio 2.1, I run into an eror:

**Error:Unable to find toolchain: <workingRoot>/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt**

and I check the directory /Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/. and there is nothing inside.

I can build the project successfully before the Android studio is upgraded. Do anyone know how to rip off this error and share me your cure? Thanks


Solution

  • After all, I take a quick and dirty way:

    1. Create directory <workingRoot>/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/pre‌​built/linux-x86_64

    2. Go under above directory and git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/

    3. Back to AS2.1, sync again. Then the error message is gone.

    Introduction address:

    https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/