Developer halves Android app download size by enabling R8 code shrinking
A developer building a word-block puzzle game found their Android App Bundle with 392 JSON levels weighed in at 17 MB on disk, but the actual device download was 13.09 MB. After an optimization pass, the real delivered size dropped to 5.88 MB — a reduction of more than half. The key culprit was four DEX files totaling 9.55 MB, generated because Capacitor's default Android setup ships with minification disabled. Enabling R8 code shrinking removed unused classes from bundled libraries like Play Services and Firebase, dramatically cutting DEX size. The developer also built a lightweight Node.js script using unzip to estimate true delivered size, since the on-disk .aab file is misleading due to Play Store metadata and per-device bundle splitting.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in