Question

I have application (apk) that uses native code (.so in libs/armeabi, libs/x86 etc). I'd like to distribute separate apk for the ARCH as it will be too large if it contains libs for all the archs. How can i do it? Can i build the app for the arch and upload them to Google Play one-by-one to let Google Play select apk for the arch automatically? APK expansions files are not suitable as the app can have only 2 files but i need 3 archs at least. How does Google Play understand the apk is for armeabi f.e (if it contains only libs/armeabi .so-files)?

Was it helpful?

Solution

To upload one APK for each arch, you need to create these APKs with different version codes. (android:versionCode inside your manifest).

The store will deliver to the user the compatible APK with the higher version code, and there is no downgrade. So you need to respect this rule: x86 APK version number > ARMv7 APK version number > ARMv5 APK version number > version numbers you were using before having multiple APKs.

The store will understand the APK is for a specific arch if you have the associated libs/ARCH folder inside your APK.

When you upload your APKs to the store, you first need to switch to advanced mode: advanced mode switch on Google Play Store

then you can upload all the APKs you want, with different ARCH support and different version codes. Once its done you'll see a summary with the version codes and differences between the APKs that are uploaded, and you will not be able to go back to simple mode: multiple APKs on Google Play Store

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top