工作中经常遇到Android版本是哪个API Level,老是记不住,所以写此文,方便查询。
具体参考android源码文件 android\frameworks\base\core\java\android\os\build.java,这个文件记录了Android版本和API Level的对应关系
Platform Version | API Level | Version Code | 备注 |
Android 1.0 | 1 | BASE | 2008.10 |
Android 1.1 | 2 | BASE_1_1 | 2009.02 |
Android 1.5 | 3 | CUPCAKE纸杯蛋糕 | 2009.05 |
Android 1.6 | 4 | DONUT甜甜圈 | 2009.09 |
Android 2.0 | 5 | ECLAIR奶油夹心 | 2009.11 |
Android 2.0.1 | 6 | ECLAIR_0_1 | 2009.12 |
Android 2.1 | 7 | ECLAIR_MR1 | 2010.01 |
Android 2.2 | 8 | FROYO冻酸奶 | 2010.06 |
Android 2.3 | 9 | GINGERBREAD姜饼 | 2010.11 |
Android 2.3.3 | 10 | GINGERBREAD_MR1 | 2011.02 |
Android 3.0 | 11 | HONEYCOMB蜂窝 | 2011.02 |
Android 3.1 | 12 | HONEYCOMB_MR1 | 2011.05 |
Android 3.2 | 13 | HONEYCOMB_MR2 | 2011.06 |
Android 4.0 | 14 | ICE_CREAM_SANDWICH冰淇淋三明治 | 2011.10 |
Android 4.0.3 | 15 | ICE_CREAM_SANDWICH_MR1 | 2011.12 |
Android 4.1 | 16 | JELLY_BEAN果豆冻 | 2012.06 |
Android 4.2 | 17 | JELLY_BEAN_MR1 | 2012.11 |
Android 4.3 | 18 | JELLY_BEAN_MR2 | 2013.07 |
Android 4.4 | 19 | KITKAT巧克力 | 2013.10 |
Android 4.4W | 20 | KITKAT_WATCH | KitKat for watches |
Android 5.0 | 21 | LOLLIPOP棒棒糖 | 2014.10 |
Android 5.1 | 22 | LOLLIPOP_MR1 | 2015.03 |
Android 6.0 | 23 | M棉花糖 | 2015.05 |
Android 7.0 | 24 | Nougat牛轧糖 | 2016.05.18 |
Android 7.1 | 25 | N | |
Android 8.0 | 26 | Oreo奥利奥 | |
Android 8.1 | 27 | O | |
Android 9.0 | 28 | Pie | |
Android 10.0 | 29 | Q | |