Best practices using compilers in Android Studio
summary
Android Studio compiler work converts Java 8 lambdas via desugaring into generated classes so they run on old VMs, makes DX incremental by emitting one dex file per class for faster debug builds, and replaces DX with D8 which preserves debug info and yields about 16% faster clean builds. R8 merges Kotlin lambdas and shrinks code, saving ~100 KB and ~25% compile time on one large app and reducing dex size ~25% on system apps. App bundles use a dex splitter to keep whole-program shrinking across dynamic features.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:00Incremental Dexing
- 3:40Incremental Annotation Processors
- 5:30Demo
- 7:06Oncreate Method
- 7:52Meta Factories
- 9:12The Apk Analyzer
- 12:04Dextre
- 12:54How Is D8 Integrated into the Gradle Build System
- 18:08Application Size
- 18:49How Does Proguard Work
- 19:09Android Studio 3 2
- 24:46Android App Bundle
related talks
41mDigging into D8 and R8
55mCompilers. Dalvik. ART. And everything in between
27mClojure and Android
42mUnderstanding the Kotlin to Dalvik bytecode translation
41mShrink, Secure & Optimize Your App With R8
35mUnderstanding the Kotlin to Dalvik bytecode translation
35mWhat's in the Android Toolbox?
47mWhat's New in Android Studio
