Ways to reduce the size of a android app

Akshay Nanjunda
4 min readMay 31, 2021

--

People do look into the size of the apps many times be it when the space is running out in the smart phone or when you are downloading the apps In the instance where your phone is running out of memory then the apps that are larger in size will be the first ones for be uninstalled even and in case when you are downloading the apps then you would first look into the size of the apps and here if you see the size of the apps are more then you would not install the apps

These instances prove how important the app sizes are if the app size are more then install rates might be very less and the uninstalls would be very high.Taking these into consideration we are listing out some of the steps that are helpful in reducing the size of the app

Optimization and compression of image files

It is always good to see the high quality images in the app where as when it comes to size of the app it is always on the downside high resolution images would slow down the apps and also the size of the app increases But there is also a way out of this

Basically the images are usually used in two formats either .jpg or .png. You can reduce the size of the file with the help of some compressor tools some of the tools for compressing jpg tools are guetzii and packjpg and there are other tools to reduce the png formats

Some of the other steps that can be taken are

Creating the simple images through the vector graphics are always takes the minimal space and it is already available in android itself as vector drawable images where you can create the images under 100bytes with the decent quality

Another way is through the bitmap image that can be created using the tools like Draw or there is another tool called wysiwyg image editor where you can create the bitmap images and resize them to fit different screen resolutions

Removing the codes methods that are not used or repetitive

In any kind of development atmosphere be it mobile app development or developing any other stuff when you code there are always the chances you find redundant or unused codes by end of the development these code just makes the apps size and slow down the working of the apps or sometimes do create the bug so it is very important to clear out the codes that are not in use or redundant and there are several tools that can help you doing that

R8 code shrinker tool

It is difficult to sit and find out the redundant codes it is here such tools do come into help and many companies do look into the this as the potential tool usage of this tools reduces the size of APK by automatically deleting the redundant code

Usage of the proguard

R8 is unstable since they are very new companies to prefer usage of the proguard for removing the repetitive codes but there is a disadvantage with proguard also where some times proguard removes the code that is most needed for the apps so proguard tools shoul be used very carefully

Android Lint a code scanning tool

As the heading says it is a code scanning tool and well it identifies the unused resources and again it just identifies the unused resources but it wont remove the resources that are not used resources what it does is it generates the report containing redundant codes and they have to be manually removed which is most time consuming when there are other tools which automatically removes the redundant resources and saves the time

Donot make the extensive use of resource from libraries

The resource from the libraries are usually used by the designers to get the good look and feel to the append most commonly used are google play services majorly used to translate the app text and android support libraries for the user experience when you are using these libraries or any other librarie they do carry the code that is also not required for your app. These libraries when used also increases the size of the app by a large margin, when these kind of libraries are used editing the files of the libraries to keep the resources that is required and removing that are not required will make sure that the space is cleaned up and will reduce the size of the app

Android size analyzer plugin is must

If you are unaware of these plugins or the tools what you can always do is hire one of the best android app development companies in dubai or use the plugin which scans through each and ever element in our app and recognize what is required and what is not required and does help in lot of other stuff which helps in reduction of the app size

It can understand the composition of DEX files

View the right sizes of the file in Apk

Do a side by side comparison of apk

Conclusion

In the above blog there is a mention about why reducing the app size a important factor and also the necessary steps to reduce the app size and we brillmindz one of the best mobile app development companies in dubai dont only develop the app but also make sure the app is built with the suitable size which increases the app installs ans decreases the app uninstalls

--

--