How API levels work
Every Android platform release has an integer API level that identifies its framework revision. You reference it in build.gradle through minSdk, targetSdk and compileSdk, and in code through Build.VERSION.SDK_INT compared against a Build.VERSION_CODES constant. For example, an Android 14 check reads if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE).
Google retired public dessert names after Android 9 (Pie), but AOSP kept the alphabetical codenames internally — Quince Tart, Red Velvet Cake, Snow Cone, Tiramisu, Upside Down Cake, Vanilla Ice Cream, Baklava, Cinnamon Bun.
FAQ
What API level is Android 14?
API level 34, codename Upside Down Cake, constant UPSIDE_DOWN_CAKE.
What is the latest Android API level?
API 37 — Android 17, internal codename Cinnamon Bun — which reached stable in June 2026. API 36 is Android 16 (Baklava).
What minSdk should I choose?
It's a trade-off between reach and maintenance. Many teams sit around API 24–26 today; check current device distribution and see the minSdk vs targetSdk vs compileSdk guide.