Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ABIs [armeabi, mips] are not supported for platform android NDK

I am using JNI code in my project with abiFilters like below

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.intel.hellojni"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        externalNativeBuild {
            cmake {
                cppFlags ""
            }
        }
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:+'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

it's working fine in one system but after moving a code to other system,it show below error for import,i have checked with new created project it shoes the same error

ABIs [armeabi, mips] are not supported for platform. Supported ABIs are [armeabi-v7a, arm64-v8a, x86, x86_64].

Build command failed.
Error while executing process F:\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\Users\Intel\Downloads\TestJNI\app -BC:\Users\Intel\Downloads\TestJNI\app\.externalNativeBuild\cmake\debug\armeabi -DANDROID_ABI=armeabi -DANDROID_PLATFORM=android-15 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Intel\Downloads\TestJNI\app\build\intermediates\cmake\debug\obj\armeabi -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=F:\sdk\ndk-bundle -DCMAKE_CXX_FLAGS= -DCMAKE_TOOLCHAIN_FILE=F:\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=F:\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
 (include)   CMakeLists.txt 
Open File
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

if I remove armeabi and mips like below then it's working

ndk {
       abiFilters "armeabi-v7a", "x86"
}

I have already installed CMake and NDK for android studio.

like image 360
MJM Avatar asked Sep 08 '18 09:09

MJM


People also ask

What is supported Abis?

Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has its own Application Binary Interface (ABI). An ABI includes the following information: The CPU instruction set (and extensions) that can be used.

What does Armeabi mean?

armeabi stands for ARM embedded application binary interface, it means the image that the android is running is built with EABI support. armeabi-v7a code is extended armeabi code which can contain extra CPU instructions, and have support for hardware floating point operations.

What is Arch abi?

The Architecture Billings Index is an economic indicator for nonresidential construction activity, with a lead time of approximately 9–12 months.


2 Answers

remove 'armebi' from abiFilters in your build.gradle file. armebi is no longer supported by the NDK. A correct list could be:

ndk {
  abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
like image 118
larsaars Avatar answered Sep 27 '22 22:09

larsaars


As the message says, those ABIs are no longer supported by the NDK. This is mentioned in the NDK r17 changelog:

Support for ARMv5 (armeabi), MIPS, and MIPS64 has been removed. Attempting to build any of these ABIs will result in an error.

As others have said, there are not a significant number of devices out there that benefit from targeting any of these ABIs.

like image 28
Dan Albert Avatar answered Sep 27 '22 20:09

Dan Albert