Android runtime, build and Gradle interview questions
ART and DEX, R8, KSP, Gradle builds and variants, garbage collection, threads, and light Java and OOP.
– interview-ready · 10 questions in this topic
– of 10 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- ART: interpreter, JIT and AOTOrder the steps
- R8, shrinking and keep rulesPick the fix
- kapt vs KSPPick the fix
- Speeding up Gradle buildsPick the fix
- Build types, flavors and variantsPredict
- Version catalogs and convention pluginsPick the fix
- Garbage collection on AndroidSpot the bug
- Threads, @Volatile and synchronizedPick the fix
- OOP principles in KotlinPick the fix
- Interface vs abstract classPredict
Practise this topic
Flashcards · 15
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 10 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 2 sets
Timed, out loud, then tick what you covered. Needs JavaScript.
Fix this PR · 1 review
Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
DEX limit
A single DEX file can reference at most 65,536 methods; multidex is built in from Android 5.0.
D8
D8 is the dexer that turns Java bytecode into DEX; R8 does the same while shrinking and optimising.
KSP
KSP processes Kotlin symbols directly and is often about twice as fast as kapt.
Configuration cache
Gradle's configuration cache reuses the task graph when build scripts haven't changed.
ART
ART replaced Dalvik as the only runtime in Android 5.0.
Printable cheat sheet · Review your weak spots in this topic
Share your progress
Sources: Question outline adapted from Android-Interview-Questions by Mohsen Mirhoseini, licensed under Apache 2.0. We reorganised the questions, rewrote every answer and added new ones. Credits and license