Question Detail

My Android application apk size has 18MB. How can I reduce the size of APK?
through Analyze APK
Build->Analyze APK (Click) it shows me all description were taking too much size
there were some Images with too much size I have to replace them with there optimize Images but still my app has 16MB.

I have imported PayPal Gradle file it has too much size how can I reduce that library size. which will help me to reduce Android App size.

 

 


Thread Reply

Anonymous

- 8 months ago

Use Analyze APK :

After Android Studio 3 there is very useful tool added in our Android Studio that is Analyze APK.

You can find out with help of Analyze APK how much size your apk getting and which part of our Android Package has huge size files.

Reduce Images: 

Mager factor to increase app size going through images also.

Sometimes we use multiple and too much images which has too much file size 

Use optimize images if needed otherwise use SVG for icons and where you can use SVG has good quality and resizable and change color accordingly.

SVG has far small size then your images png and JPEG file avoid images as much you can.

Remove Library (Gradle)

In your gradle file remove all unused lib which is not using. You can comment them for future use.

Every library has there own classes and resources which will include with your project when you complild or added in gradle file and increase app size.

Trim Libraries

when we include any gradle dependancy Library import there all resources with current android project to reduce android application size you have to exclude unuse classe from library you can do it through excludepackage{

 

in your application tag gradle file