Understanding the Kotlin to Dalvik bytecode translation
summary
Kotlin/Java compiles to class files, D8 produces .dex, and ART may interpret, JIT or AOT compile — and concrete surprises happen: an overloaded method invoked by reflection throws NoClassDefFoundError because reflection lookup loads a missing API-level class after minification renamed overloads; an intermittent crash traces to dex2o doing an incorrect boolean optimization across branches — dex->o boolean optimization bug; practical steps: inspect the R8/ProGuard mapping, decompile the APK with JEX and inspect DEX contents, run with interpret-only or enable JIT/AOT logging to isolate compilation-stage faults.
AI-written summary · about
chapters (11)
- 0:00Kotlin bytecode translation
- 1:25Speaker background
- 2:08Source to machine code steps
- 6:09Source to Java bytecode
- 9:05Java to DEX bytecode
- 13:20Minification and DEX tools
- 20:07Bytecode features not in source
- 24:46DEX to machine code modes
- 29:20Debugging DEX-to-OAT bug
- 32:15Translation layers summary
- 35:01Q&A
related talks
42mUnderstanding the Kotlin to Dalvik bytecode translation
55mCompilers. Dalvik. ART. And everything in between
41mDigging into D8 and R8
34mUnderstand Every Line of Your Codebase
34mAndroid or the ART of Optimizing Java Code
28mBest practices using compilers in Android Studio
29mBytecode analysis for everyone!
40mJourney of APK from compilation to launch
