Reputation: 15
I have created an apk whose size is 80mb. I have set minifyEnabled true
shrinkResources true
in Gradle file. Now I want to optimize the images so that it will reduce the APK size. How can I optimize the images in android?
Upvotes: 1
Views: 3630
Reputation: 830
When you set the minifyEnabled property to true, it only make your app code become jumble and yes it will reduce your APK or bundle but not your images . Code shrinking (also known as tree shaking), is the process of removing code that R8 determines is not required at runtime. This process can greatly reduce your app's size if, for example, your app includes many library dependencies but utilizes only a small part of their functionality. Please refer to this.
If you want to reduze all your image stored in drawable, considered this:
Detail explanation you can find here.
Upvotes: 1