compileSdk and targetSdk Version Mappings
https://apilevels.com/#definitions
This is an overview of all Android versions and their corresponding identifiers for Android developers. Anyone is welcome to open an issue or pull request. Happy developing!
Level 31 Android 12
S
2021
Level 26 Android 8.0
O
92.9%
Level 24 Android 7.0
N
96.2%
Level 21 Android 5.0
LOLLIPOP
, L
99.3%
2014
Level 19 Android 4.4
KITKAT
2013
Level 18 Android 4.3
JELLY_BEAN_MR2
Jelly Bean
Level 17 Android 4.2
JELLY_BEAN_MR1
2012
Level 16 Android 4.1
JELLY_BEAN
Level 15 Android 4.0.3 – 4.0.4
ICE_CREAM_SANDWICH_MR1
Ice Cream Sandwich
2011
Level 14 Android 4.0.1 – 4.0.2
ICE_CREAM_SANDWICH
Android 3
Level 13 Android 3.2
HONEYCOMB_MR2
Honeycomb
Level 12 Android 3.1
HONEYCOMB_MR1
Level 11 Android 3.0
HONEYCOMB
Android 2
Level 10 Android 2.3.3 – 2.3.7
GINGERBREAD_MR1
Gingerbread
Level 9 Android 2.3.0 – 2.3.2
GINGERBREAD
2010
Level 8 Android 2.2
FROYO
Froyo
Level 7 Android 2.1
ECLAIR_MR1
Eclair
Level 6 Android 2.0.1
ECLAIR_0_1
2009
Level 5 Android 2.0
ECLAIR
Android 1
Level 4 Android 1.6
DONUT
Donut
Level 3 Android 1.5
CUPCAKE
Cupcake
Level 2 Android 1.1
BASE_1_1
Petit Four
Level 1 Android 1.0
BASE
None
2008
Definitions
Gradle files
minSdk
minSdkVersion
The minimum SDK version your app will support, defined in build.gradle
. For example, if your minSdk
is 26, this SDK version corresponse to API Level 26 and Android 8, so your app will only run on devices with Android 8 or higher.
targetSdk
targetSdkVersion
The SDK version that your app targets, defined in build.gradle
. This should always be the same as compileSdk
.
compileSdk
compileSdkVersion
The SDK version that your app compiles against, defined in build.gradle
. Android Studio uses this SDK version to build your AABs and APKs. This should always be the same as targetSdk
.
Code files
Build.VERSION.SDK_INT
The SDK version of the Android OS currently running on the user's device. For example, on a device running Android 11, this value will be 30
(aka Build.VERSION_CODES.R
), even if the target and compile SDK of the app is different.
Footnotes
Cumulative usage distribution figures were last updated on May 6, 2023 using data from Statcounter GlobalStats and this script. These figures may have changed significantly since the last update. You may update the figures yourself with a pull request. ↩
The codenames for Android 10 and above in the table are the internal codenames. Beginning with Android 10, Google dropped the usage of codenames publicly. ↩
Android 4.4W is the first Android release for Android Wear. ↩
See also
Last updated