What is armeabi and why they use it?

泄露秘密 提交于 2019-12-20 08:56:15

问题


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?


回答1:


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.




回答2:


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'])
}



回答3:


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


来源:https://stackoverflow.com/questions/23042175/what-is-armeabi-and-why-they-use-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!