Skip to content

compileSdk and targetSdk Version Mappings

https://apilevels.com/#definitions

Android API Levels

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!

VersionSDK / API levelVersion codeCodename

Cumulative
usage 1

Year
Android 14 DEVLevel 34UPSIDE_DOWN_CAKEUpside Down CakeTBD
Android 13Level 33TIRAMISUTiramisu 220.0%2022
Android 12Level 32 Android 12LS_V2Snow Cone 240.8%
Level 31 Android 12S2021
Android 11Level 30RRed Velvet Cake 261.9%2020
Android 10Level 29QQuince Tart 278.5%2019
Android 9Level 28PPie86.6%2018
Android 8Level 27 Android 8.1O_MR1Oreo91.3%2017
Level 26 Android 8.0O92.9%
Android 7Level 25 Android 7.1N_MR1Nougat94.0%2016
Level 24 Android 7.0N96.2%
Android 6Level 23MMarshmallow97.9%2015
Android 5Level 22 Android 5.1LOLLIPOP_MR1Lollipop99.1%2015
Level 21 Android 5.0LOLLIPOP, L99.3%2014
Android 4Level 20 Android 4.4W 3KITKAT_WATCHKitKatNo data
Level 19 Android 4.4KITKAT2013
Level 18 Android 4.3JELLY_BEAN_MR2Jelly Bean
Level 17 Android 4.2JELLY_BEAN_MR12012
Level 16 Android 4.1JELLY_BEAN
Level 15 Android 4.0.3 – 4.0.4ICE_CREAM_SANDWICH_MR1Ice Cream Sandwich2011
Level 14 Android 4.0.1 – 4.0.2ICE_CREAM_SANDWICH
Android 3Level 13 Android 3.2HONEYCOMB_MR2Honeycomb
Level 12 Android 3.1HONEYCOMB_MR1
Level 11 Android 3.0HONEYCOMB
Android 2Level 10 Android 2.3.3 – 2.3.7GINGERBREAD_MR1Gingerbread
Level 9 Android 2.3.0 – 2.3.2GINGERBREAD2010
Level 8 Android 2.2FROYOFroyo
Level 7 Android 2.1ECLAIR_MR1Eclair
Level 6 Android 2.0.1ECLAIR_0_12009
Level 5 Android 2.0ECLAIR
Android 1Level 4 Android 1.6DONUTDonut
Level 3 Android 1.5CUPCAKECupcake
Level 2 Android 1.1BASE_1_1Petit Four
Level 1 Android 1.0BASENone2008

Definitions

Gradle files

Kotlin variableGroovy variableDefinition
minSdkminSdkVersionThe 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.
targetSdktargetSdkVersionThe SDK version that your app targets, defined in build.gradle. This should always be the same as compileSdk.
compileSdkcompileSdkVersionThe 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

VariableDefinition
Build.VERSION.SDK_INTThe 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

  1. 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.
  2. 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.
  3. Android 4.4W is the first Android release for Android Wear.

See also

Personal notes