cole
cole

Reputation: 3357

Expected caller to ensure valid ABI: MIPS

Getting an error when trying to fix error -

No toolchains found in the NDK toolchains folder for ABI with prefix mips64el-linux-android

Do not want to upgrade as afraid it might break my application and need to use NDK to work with C++.

After following steps for workaround to fix the error - Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm

New error:

Expected caller to ensure valid ABI: MIPS

Any help on how to fix the issue.

Upvotes: 0

Views: 2414

Answers (2)

shizhen
shizhen

Reputation: 12583

From your TOP-LEVEL build.gradle, change your classpath for android gradle plugin to 3.2.1 or higher.

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

Or for other options, please check here: Three options for solving this kind of issue

Upvotes: 1

Michael
Michael

Reputation: 58467

You should specify an ABI filter.

You haven't mentioned how you are building. If you're using Gradle, then you put something like this in the defaultConfig block in your build.gradle:

ndk {
    abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}

If you're invoking ndk-build directly, then you put this on the ndk-build command line:

APP_ABI=armeabi-v7a arm64-v8a x86 x86_64

Or inside your Application.mk:

APP_ABI := armeabi-v7a arm64-v8a x86 x86_64

The ABI filter I showed is just an example. It's up to you to decide which ones you want to build for. arm64-v8a and armeabi-v7a are by far the most common ones among Android devices.
mips, mips64 and armeabi are no longer supported by the NDK.

Upvotes: 2

Related Questions