Search code examples
androidgradleapk

What makes the minified Hello World Android APK so large - 800KB?


This isn't a general gripe about the bloat of Android apps nowadays*, but a very specific question:

If you install Android Studio 2.3.3 and create the "Hello world" sample app (as described in the Building your first app official tutorial), then build a release APK, the resulting file is 825KB (I tested this on Linux, but I suspect the output is the same on other OSes).

Android Hello world release build

I've already enabled ProGuard and there are no images or other resources.

What goes in that APK by default?

Why?

How can that bloat be taken out?

By comparison, in 2013 a Hello World app was under 10Kb.

* I remember when decent fully-functional apps were a few hundred KBs, and by comparison a PWA like Uber is 1% the size of the corresponding Android app


Solution

  • Turns out that by removing all sorts of resources and using insane compression, an empty APK can be brought down to 678 bytes (!).

    Thanks to Udayraj Deshmukh for pointing out a blog post detailing how to reduce an Android APK's size by 99.99%.