1

I have a application. It has lot of third party libraries and the image resources and all of them are necessary.

  • resource folder is 25mb
  • Total size of application in 40 mb

  • How to reduce the size of the app when we are releasing to app store
  • What are the methods i can use to reduce the apk.
  • Can we use splitting of resources to load multiple apk's to load multiple api's to plaster (How to do this)

Present grade release config:

release {
            shrinkResources false
            zipAlignEnabled true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        }
Devrath
  • 42,072
  • 54
  • 195
  • 297

2 Answers2

1

You can convert all PNGs to WEBP images that are 20% smaller. It can be done via Android Studio by right-click the drawable folder(s) and press "Convert to WEBP".

emandt
  • 2,547
  • 2
  • 16
  • 20
1

Firstly as mentioned by Emandt you can convert all your images to the smaller WebP format. Also enable minifyEnabled true and shrinkResources true .

How to reduce the size of the app when we are releasing to app store

It is recommended we only upload apk bundles to play store. This helps play store to by default use its dynamic delivery feature and provide stripped down apks to users. The apk would only contain abi specific files (device processor specific files), device density specific resources etc. So a user is presented to download a lesser sized apk.

fyi: If you really want to upload only apks, you can do this by enabling this apk splitting manually, refer https://developer.android.com/studio/build/configure-apk-splits This way you upload multiple splitted apks for the same application, just manually this time.

Can we use splitting of resources to load multiple apk's to load multiple api's to plaster

To basically split resources you can actually go for creating one or many dynamic feature module(s) in your project.

Dynamic feature modules provide users a choice to download a part of the project (and all the associated libraries and resources) on the fly when it is needed. So we do not have to create the full size apk while publishing the apk. This is actually a very good way to reduce the upfront downloadable size of the apk (really increased the number of downloads for me).

e.g an app can have a separate camera section. It is only when a user tries to access that feature is when we download the module for it on demand. In fact we can even uninstall that module after use (say a terms and condition section in the app).

What are the methods I can use to reduce the apk

The general ways to reduce size of an apk is here

karan gupta
  • 296
  • 2
  • 4