Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do we need to upload universal-apk if we are uploading different apk's for each ABI

My app size has reached to 117 MB, as play store does not allow to upload an apks, if its greater than 100 MB.

So i used split, and created multiple versions of apk each based on different ABI

If i analyze universal-apk, i got these type of ABI's in lib folder;

  • armeabi-v7a
  • x86
  • armeabi

enter image description here

I used this to create separate apk for each abi

splits {
    abi {
        enable true
        reset()
        include 'x86', 'armeabi-v7a', 'armeabi'
        universalApk true
    }
}

Now i get 4 types of apk in result. The universal-apk size is 117 MB, where as armeabi is 68 MB.

enter image description here

So its obvious from this, that i just can't upload the universal-apk on play store, hence i will end up uploading 3 apk's on play store.

Now my questions is what will happen to those users whose cpu architecture do not fall into these categories.

I noticed that Galaxy S7 is arm64-v8a, there will be some other architectures available in the market other than these, so what will happen to those devices if universal-apk does not exist, or armeabi-v7a and x86 are enough to target all of the devices available in the market.

Will this reduce target app users? I am unable to find out the ABI share on Google Play

like image 293
dev90 Avatar asked Jan 03 '18 14:01

dev90


People also ask

What is a universal APK?

A universal APK contains code and resources for all ABIs in a single APK. The default value is false . Note that this option is only available in the splits. abi block. When building multiple APKs based on screen density, Gradle always generates a universal APK that contains code and resources for all screen densities.

What should be unique for each APK?

Each APK must have a different version code, specified by the android:versionCode attribute. Each APK must not exactly match the configuration support of another APK. That is, each APK must declare slightly different support for at least one of the supported Google Play filters (listed above).

What is the difference between APK and AAB?

Basically, AAB is a publishing format that a developer submits to the Play Store while APK is the packaging format for Android apps that you install on your device.

What is split config APK?

Split APKs are very similar to regular APKs — they include compiled DEX bytecode, resources, and an Android manifest. However, the Android platform is able to treat multiple installed split APKs as a single app.


2 Answers

The first step is always to work from data. Have a look at your existing users in the Play Developer Console to see what the distribution is like for your users.

For users without one of these ABIs they will get "This app is not compatible with your device".

However, x86_64 and arm64-v8a are backwards compatilble with x86 and armeabi-v7a. By covering the ones you have chosen it will run on almost all devices, mips probably isn't worth worrying about.

Your users on newer devices will get better performance if you add x86_64 and arm64-v8a variants as well, but it should work without this.

armeabi is now very rare but some very old devices do have that restriction. If you are targeting a modern android version (eg ICS+) you will probably be ok.

like image 58
Nick Fortescue Avatar answered Oct 30 '22 20:10

Nick Fortescue


A list of all the supported ABI's can be found here:

https://developer.android.com/ndk/guides/abis.html#sa

If you remove the reset() option, then the splits will be built for each supported ABI.

like image 21
dazza5000 Avatar answered Oct 30 '22 18:10

dazza5000