4. armeabi,armeabi-v7a,arm64-v8a


Recently, our company’s app needs to optimize the package volume, one of which is the optimization of so package.
I’m not very clear about the knowledge of so package. I’ll sort it out.

ndk {
    //Set the supported so Library Architecture
    abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
1. CPU processor architecture supported by Android
  • mips
  • mips64
  • x86
  • x86_64
  • armeabi
  • armeabi-v7a
  • arm64-v8a
2. What is ABI?
  • ABI: Application Binary Interface
3. What are abifilters?
  • A filter that specifies the generation of a pattern specific ABI package
4. How do large factories adapt to different CPU architectures?
  • WeChat(arm64-v8a)
  • TaoBao(armeabi-v7a)
  • Alipay, mobile phone QQ(armeabi)
5. Main ABI and auxiliary ABI adaptation process
4. armeabi,armeabi-v7a,arm64-v8a

6. How should we adapt?
  • Scheme 1: only adapt to armeabi

    • Advantages: it basically adapts to all CPU architectures
    • Disadvantages: low performance, which is equivalent to the need for auxiliary API or dynamic transcoding on most mobile phones
  • Scheme 2: only applicable to armeabi-v7a

    • Similarly, scheme 1 only filters some old equipment, which is relatively balanced in performance and compatibility.
  • Scheme 3: only applicable to arm64-v8a

    • Advantages: best performance
    • Disadvantages: it can only run on arm64-v8a devices, and some users of old devices should be abandoned.

These three schemes are all possible. In the current app adaptation of large manufacturers, these three schemes are available, most of which are the first two.

The specific choice depends on our consideration. The performance is arm64-v8a, the compatibility is armeabi, and the balance between performance and compatibility is armeabi-v7a.

2021-06-01 good night