Android development
Gradle builds, library upgrades, UI and performance problems we ran into while building Android apps with a coding agent, and how each one was solved.
Notes
Pre-gzipping Android assets, measured: zero APK savings, and .pack.gz became .pack with a FileNotFoundException
Five pre-gzipped Android asset packs were 18 bytes each larger than the APK's own deflate, and the .gz names vanished, causing FileNotFoundException on launch.
A market:// link opens a store chooser on SKT-sold Samsung phones: set the Play package first
On two SKT-sold Samsung phones, three store apps answer a market:// link and Android shows a chooser. Setting the Play package first opened Play directly.
A splash that never moved on: addOnCompleteListener(this) and onStop
Our spelling app used addOnCompleteListener(this) for Remote Config; the listener was dropped at onStop, so a screen-off launch never left the splash.
"6.7" < "6.11" is false: comparing Remote Config versions as strings froze content updates
A Korean spelling app compared Remote Config content versions as Kotlin strings, so from 6.10 on, devices stored at 6.2 to 6.9 got no quiz or notice updates.
R8 kept 5 AdMob test IDs in our release build: one listOf().any line and a dex count
A real-ID Block Turn build kept 5 Google test ad strings in its dex. A plain || in place of listOf().any took it to 0. We count IDs and never print them.
16 KB page size support: a blue tint that only NDK 27 and 29 produced, and 12 .so files measured again
Six .so files rebuilt for Google Play's 16 KB page rule; NDK 27 and 29 tinted photo transitions blue. Rechecked: NDK 25 aligns to 16 KB with one linker flag.
A launch crash only on Android 7: one java.time call in a shared module and a NewApi lint gate
One java.time call crashed two minSdk 24 games on Android 7. Lint: Call requires API level 26, or core library desugaring. A NewApi gate now blocks release.
Android showed some Hangul as blank gaps: NanumSquare's cmap claimed 11,172 syllables but drew only 2,479
An Android app font listed all 11,172 Hangul syllables in its cmap, but 8,693 had no outline, so text vanished with no fallback. Cause, numbers, a check script.
androidx.pdf beta01 runs your Application.onCreate a second time, in an isolated process, and the PDF silently never opens
androidx.pdf beta01 parses PDFs in an isolated process that also runs your Application.onCreate. Without a guard, the PDF never opened and no error came back.
Jetpack Compose splits Korean between syllables, but the stacked 'R/u/l/e' label came from how a Row measures
Compose can break Korean between syllables, but the label stacked as 'R/u/l/e' on a Galaxy S21 came from Row measurement order. Each cause got its own fix.
Play Console said our DEX was 39% optimized. The culprit was a keep rule for an SDK we never used
Removing -dontoptimize left Play Console's DEX metrics at 36-39%. Deleting an unused Kakao SDK keep rule took r8.json to 85% and the AAB to 11.6 MB.
Building an Android HWP viewer: rhwp in a WebView, measured on 222 documents
The open-source rhwp engine in an Android WebView opened 221 of 222 Korean HWP/HWPX files on a Galaxy S21; a 384-page file needed virtual scrolling.