What is armeabi and why they use it?
AndroidShared LibrariesAndroid Problem Overview
I see this library (armeabi) many times when I explore open sources.
I net searched for an explanation of it, but all the results I found are talking ABOUT it and not defining it.
What is this armeabi and why are they using it in Android applications?
Android Solutions
Solution 1 - Android
Android devices have CPUs. Many of those CPUs are based on the ARM architecture, while some are based on x86, and a few others are based on other stuff like MIPS.
Some Android apps use the Native Development Kit (NDK) to create C/C++ code to link into their app. C/C++ code needs to be compiled for a specific CPU architecture. The NDK places the version of the C/C++ code compiled for each architecture into an architecture-specific directory. One of those directories is armeabi/
, which is for a generic ARM CPU. There is also armeabi-v7/
(for an ARM v7-compatible CPU), x86/
(for x86 CPUs), etc.
Solution 2 - Android
ABI - Application Binary Interface
EABI - Embedded Application Binary Interface
So ARMEABI are compiled binaries matching your android device's CPU architecture.
e.g.
arm64-v8a (Nexus 5x) - 64bit - ARM Cortex-A35, ARM Cortex-A53, ARM Cortex-A57, ARM Cortex-A72, ARM Cortex-A73
armeabi-v7a - 32bit - ARM Cortex-A5, ARM Cortex-A7, ARM Cortex-A8, ARM Cortex-A9, ARM Cortex-A12, ARM Cortex-A15, ARM Cortex-A17
To include *.so binary jniLibs using Android Studio 2.3 place them in src/main/jniLibs
folder and add the following configuration to your *.gradle file:
android {
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
}
dependencies {
compile fileTree(dir: 'jniLibs', include: ['*.so'])
}
Solution 3 - Android
I did recently see a pretty good article related to the different CPU's and suggestions on how to maintain APK size while giving support for them. The article gives some info for the following:
- mips
- mips64
- X86
- X86–64
- arm64-v8a
- armeabi
- armeabi-v7a