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

2

6

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

Thermogenesis answered 3/1, 2018 at 14:2 Comment(6)
Can you include arm64-v8a to your abi definitions?Unlike
It looks like if you remove reset and include then all abi's that are supported for the store will be built. Is this a valid approach for you?Unlike
yes, i can include all of these, but the size of all other apk's is way smaller than others, except armeab-v7a and x86 all other architectures don't have any .so files, so i am afraid if adding separate apk's for each of them can lead to crashes, thats why i asked, if armeab-v7a and x86 are enough to support all available devices in the market.Thermogenesis
Perhaps the other architectures have those dependencies included on the device? I am not an expert abi splits, but given your observation about the S7 I would say that you would need to include all abis if you want to support all available devices.Unlike
let me give you an example, some external library needed to use libUnity.so, they added libUnity.so in both armeabi-v7a and x86 folder. so universal-apk has 2 linunity.so files, and its increasing the size of universal-apk, thats the reason i split apk, and both architecture now have only 1 linUnity.so file.Thermogenesis
The other architectures might not have as big of library dependencies. Have you tried it out?Unlike
P
5

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.

Plantagenet answered 5/1, 2018 at 11:36 Comment(3)
Thanks @Nick, one more question, can armeabi devices run armeabi-v7a files, and will it be fine if i don't upload a separate apk for armeabi devices, as all the .so files that i have are targeting either x86 or armeabi-v7a devices.Thermogenesis
Edited to add more detail. I'd guess you will be fine with only armeabi-v7a if you have a relatively new min-SDK (eg ICS+). But you should look at your existing users in the stats in the Play console.Plantagenet
I have a question, if you don't mind. However, x86_64 and arm64-v8a are backwards compatilble with x86 and armeabi-v7a. - Does this mean that I can leave out x86 and only add x86_64? Currently my abi filter is - abiFilters "x86_64", "armeabi-v7a", "arm64-v8a"Centri
U
1

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.

Unlike answered 3/1, 2018 at 14:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.