seo

11 Tips to Reduce Your Android Application Package Size

By James Tredwell on March 9, 2019

In the current age of living and leading the life around various mobile application apps, the size of the application plays an important role for the user. More the application package size, more the download time leading lesser the likeability among users. There are just a world of apps for anything and everything for the user on a regular basis to use and perform the tasks of life. When given an option, the user likes to choose the one with lesser application package size to accommodate more applications than one over many applications. Hence the size of the application package on the Android operating system is crucial for the developer.

A recent survey informs that the application file size is on an average of around 11.5MB for mobile applications on the Android operating system. Based on this the Android Tablet Development companies can build the application around this file size ao that users prefer to use their application for download and use. The size aspect of an Android application is crucial as this size consumer the user’s disk space. More the size of applications leaves to more disk space publication and lesser performance of other applications of the Android device. Hence the relation between the application file size and a number of application downloads.

APK File:

Every Android Tablet Development applications consist of the APK Android application package file. The APK file has all the files that make up the ZIP file needed for installation and running the application on the android system.

Let us have a look at the 11 Tips to Reduce Your Android Application Package Size:

#1. Proguard usage

The Java class file that is freely available to shrink, optimize and obfuscate the Android application is the Proguard. The unused classes, fields, methods are detected and removed. This even renames the attributes using small names. The byte code is optimized to reduce the file size. Reduced smaller size file is the output if the Proguard.

#2. Google Play Services

The latest version Google Play Services 6.5 provides a better solution for reducing the memory usage and the size of the downloadable. The APK file will be broken into smaller files making it use less than 1MB. This implies the stress of not including a full library to compile a few parts of executable. Version 6.5 allows specific compilation of API into the app.

#3. JPEG Optimizer

Using the JPEG optimizer the pics used in the apps can be shrieked in size without loss of quality. The overall size of the app is reduced as the actual size of images which are used for illustration purposes are reduced. This allows compression of images with no loss of quality thus lesser size of the app.

#4. Media formats selection

If the Android application needs many types of visual, audio formats choose them based on the compression quality. For images use PNG or JPEG since these type of image formats have good compression quality and very less in size with no loss of quality. Use either type of image formats or just a single format based on requirement and size of your application. For audio use AAC since this type of format delivers good quality even after compression compared to other audio formats available in the market.

#5. Multiple APK’s

Generally a single APK is built so that it could support all functions and platforms resulting in a larger size APK. One can split a single APK into Multiple APK so that it works for a specific function resulting in a smaller size of the application file. The main goal of multiple APK is to break the single file into multiple to achieve smaller APK file size.

#6. 9 Patch Files

The 9 Patch took in the Android Studio creates the resizable bitmaps of the images. The images are scaled horizontally and vertically to create smaller size image files. This too helps us shrink the PNG format files to smaller size helping in overall reduction of the Android application size. Using regular format images creates an application of higher size. This reduces the app size drastically.

#7. Strip the debug messages

In any part of application development, the debug messages are an essential part and also occupy a lot of space. Though it’s useful for people who are developing the application, they are of no importance to the user. So make it a mandatory thing to remove all debug messages prior to the release of the application to the users for installation and working on it.

#8. Resources re-usability

One of the best ways to optimize the APK file size is to use a single layout of code rather than using it multiple times at multiple places. This avoids duplication of data, files, functions and increases the resource consumption making the run time less and faster processing of the APK. Therefore achieving the smaller APK file is done effectively here.

#9. Vector Drawables

23.2 release is supporting the Vector Drawables for the Android operating system. The redrawing performance is very much improved optimizing the size of the file. Perfect quality is the aspect of Vector Drawables that maintains the non release of the same image in 3–4 sizes is one of the best solutions for the smaller size app.

#10. Eliminate unused resources

The size of the app impacts directly on the fastness of the app download. Best way to removed unused resources in the APK file is the use of the lint tool provided by Android studio. This tool specifically checks and finds the code that doesn’t refer anything it that is not used anywhere.

#11. No Duplication

Avoiding the duplication is very easy rather than removing the code after duplication. Duplication of code or files makes the file size increase a lot making it not liable for users to download. It is better to make sure code is not duplicated so that unnecessary files are avoided.

Follow the above tips to reduce APK size in best ways possible.

This article is contributed by Merry Waran , Merry Waran — Android Tablet Development Company

Have an interesting article or blog to share with our readers? Let’s get it published

Contact Us for Free Consultation

Are You Planning to outsource Digital Tansformation services? Feel free for work-related inquiries, our experts will revert you ASAP,