How We Solve the Sideloading Crash After App Bundle Implementation
Article Summary
Tokopedia shipped Android App Bundles and immediately hit a wall: mystery crashes on random devices. The culprit? Sideloaded APKs missing critical resources.
When Tokopedia adopted Google's App Bundle format in early 2019, they saved 25% on download size but discovered a critical edge case. Users installing APKs from third-party stores or shared files experienced splash screen crashes due to missing drawable resources.
Key Takeaways
- App Bundles reduced download size by 25% compared to split APKs
- Sideloaded base APKs crashed with Resources$NotFoundException on splash screens
- Google Play Core Library 1.6.0+ prevents crashes with installation failure popup
- Bundletool extracts App Bundles into splits and standalone APKs for testing
- Simple Application class code now redirects users to reinstall from Play Store
Critical Insight
A few lines of code using Google's Play Core Library transformed fatal sideloading crashes into graceful reinstall prompts, protecting users who install APKs outside the Play Store.