Ata
Ata

Reputation: 12544

Should i bundle both Arm64-V8a and armeabi-v7a in android app?

I am tring to reduce the output app file size, there are two diffrent library for my app:

Arm64-V8a and armeabi-v7a

I want to know is it require to include both of them ?

Upvotes: 1

Views: 5272

Answers (2)

dharani
dharani

Reputation: 83

This is a valid question. If you are not going to run your app on emulator and run only on Mobile devices, then you can remove armeabi-v7a, arm64-v8a, x86 and x86_64 libs by placing below code in project build.gradle This will definitely reduce your apk file size.

defaultConfig {
    applicationId "com.xxxx.xxxxx.xxxx.xxxx"
    ndk {
        abiFilters 'armeabi-v7a', 'arm64-v8a'
    }
}

Upvotes: 2

In order to support all devices CPU architecture you need to keep the both of them and adding x86 & x86_64 as well, however to reduce the APK size try the following :

  1. Go to Android Studio Menu > Refactor > Remove Unused Resources
  2. Enable the Proguard and set shrinkResources to true
  3. Using Android Bundle, Google Play will take the rest of work by splitting your APK to APKS and show it to the user depends on their device CPU architecture

Upvotes: 1

Related Questions