Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce App (.apk) Size

Tags:

android

Help!

When I install my app on the phone to test, it is showing up to be a HUGE size, 11.35 MB. It is a very simple app that lets user browse through fun-facts. The only reason I can think of is that there are 14 JPEG files in the drawables which serve as background images of the fun-facts. The average size of these is about 500 KB.

I'd like to trim the size of my app, so as not to use up the precious resources on the user's device. Other than just getting rid of the pictures, are there ways to optimize the size of apk file?

EDIT: The pictures are photos taken by me using the Android phone itself.

like image 723
OceanBlue Avatar asked Sep 28 '10 17:09

OceanBlue


People also ask

Can you compress APK files?

You can compress an APK file (rar, zip), but it has to be decompressed in order to work. ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. It detects and removes unused classes, fields, methods, and attributes. It optimizes bytecode and removes unused instructions.

What is APK size?

New apps larger than 150 MB are now supported by either Play Feature Delivery or Play Asset Delivery. Google Play requires that the compressed APK that users download be no more than 100MB. For most apps, this is plenty of space for all the app's code and assets.

Which image codec should be used for optimize APK size?

Use WebP file format and Use vector graphics.


1 Answers

Other answers mention shrinking images. You might also consider trying ProGuard to shrink your bytecode. Here's an article on applying ProGuard to an Android app.

like image 87
Mauricio Scheffer Avatar answered Sep 26 '22 04:09

Mauricio Scheffer