I was looking into the sample code provided by QuickBlox and found that you can save upto 10 MB of apk but you have to build 4 apks. You can check the gradle file
/*There is code for excluding some native libs (it useful if you need reduce apk size and want
build apk only for specific platform). This method allows you to achieve savings about 10MB
of apk's size (but you need build 4 different apks). */
packagingOptions {
exclude '**/armeabi-v7a/libjingle_peerconnection_so.so'
exclude '**/arm64-v8a/libjingle_peerconnection_so.so'
exclude '**/x86_64/libjingle_peerconnection_so.so'
exclude '**/x86/libjingle_peerconnection_so.so'
}
About Multiple APKs
Different Android handsets use different CPUs which in turn support
different instruction sets. Each combination of CPU and instruction
sets has its own Application Binary Interface, or ABI
armeabi-v7a
arm64-v8a
x86_64
x86
These are ABI
building 4 apks meant you can create apk for these 4 ABI's separately. The main idea is to not include the libraries which are not meant for specific ABI thus reducing the size by including only the libraries which are required for that ABI
e.g.
splits {
abi {
enable true
reset()
include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' //select ABIs to build APKs for
universalApk true //generate an additional APK that contains all the ABIs
}
}
Update:
How to upload multiple APKs to PlayStore?
this question has already been asked on SO. please check this question