Android开发中常常有版本比较这个功能,来做版本兼容或者,其他相关效果等
 
以下是Android 7.0版本下的源码:
 
  public static class VERSION_CODES {
/**
* Magic version number for a current development build, which has
* not yet turned into an official release.
*/
public static final int CUR_DEVELOPMENT = ; /**
* October 2008: The original, first, version of Android. Yay!
*/
public static final int BASE = ; /**
* February 2009: First Android update, officially called 1.1.
*/
public static final int BASE_1_1 = ; /**
* May 2009: Android 1.5.
*/
public static final int CUPCAKE = ; /**
* September 2009: Android 1.6.
*/
public static final int DONUT = ; /**
* November 2009: Android 2.0
*/
public static final int ECLAIR = ; /**
* December 2009: Android 2.0.1
*/
public static final int ECLAIR_0_1 = ; /**
* January 2010: Android 2.1
*/
public static final int ECLAIR_MR1 = ; /**
* June 2010: Android 2.2
*/
public static final int FROYO = ; /**
* November 2010: Android 2.3
*/
public static final int GINGERBREAD = ; /**
* February 2011: Android 2.3.3.
*/
public static final int GINGERBREAD_MR1 = ; /**
* February 2011: Android 3.0.
*/
public static final int HONEYCOMB = ; /**
* May 2011: Android 3.1.
*/
public static final int HONEYCOMB_MR1 = ; /**
* June 2011: Android 3.2.
*/
public static final int HONEYCOMB_MR2 = ; /**
* October 2011: Android 4.0.
*/
public static final int ICE_CREAM_SANDWICH = ; /**
* December 2011: Android 4.0.3.
*/
public static final int ICE_CREAM_SANDWICH_MR1 = ; /**
* June 2012: Android 4.1.
*/
public static final int JELLY_BEAN = ; /**
* Android 4.2: Moar jelly beans!
*/
public static final int JELLY_BEAN_MR1 = ; /**
* Android 4.3: Jelly Bean MR2, the revenge of the beans.
*/
public static final int JELLY_BEAN_MR2 = ; /**
* Android 4.4: KitKat, another tasty treat.
*/
public static final int KITKAT = ; /**
* Android 4.4W: KitKat for watches, snacks on the run.
*/
public static final int KITKAT_WATCH = public static final int L = ; /**
* Lollipop. A flat one with beautiful shadows. But still tasty. Android 5.0
*/
public static final int LOLLIPOP = ; /**
* Lollipop with an extra sugar coating on the outside! Android 5.1
*/
public static final int LOLLIPOP_MR1 = /**
* M is for Marshmallow! Android 6.0
*/
public static final int M = ; /**
* N is for ¯\_(ツ)_/¯. Android 7.0
*/
public static final int N = ;
}

Android 各API版本代码常量的更多相关文章

  1. Android的API版本和名称对应关系

    Android版本名和API Level关系全称 Android的版本 Android版本名称Code name Android的API level Android 1.0 (API level 1) ...

  2. [Android]高低API版本兼容之@TargetApi

    使用@TargetApi annotaion, 使高版本API的代码在低版本SDK不报错 例如: AsyncTask.THREAD_POOL_EXECUTOR, 这个静态变量是API11才有的, 设置 ...

  3. android API版本对应的系统版本及Android获取手机和系统版本等信息的代码

    学了这么久的Android,竟然一直对其API对应的名称关系一值搞不清楚,现在网上认真看了下资料,转载一个觉得写得不错的作者的文章,记下来: [背景] 之前折腾android期间,慢慢地知道了,And ...

  4. Xamarin.Android 入门之:Android API版本设置

    一.引言 Xamarin.Android有几个Android API级别设置,确定多个版本的Android应用程序的兼容性.本博客解释了这些设置意味着什么,如何配置它们,以及它们在运行时对您的应用程序 ...

  5. android 6 (API 23) 及更高版本 面向 NDK 开发者的 Android 变更

    Android N 已经出来,有了好大的变化,对于我们开发者来说,最大的影响莫过于**NDK**相关东西. 以下是在中国谷歌开发者社区看到的.里面有好多的变化,欢迎大家来讨论. 发布人:开发顾问 Dm ...

  6. 我的Android进阶之旅------>Android中高低API版本兼容使用@TargetApi或者@SuppressLint("NewApi")

    Android中高低API版本兼容使用@TargetApi或者@SuppressLint("NewApi") 例如:AndroidManifest.xml中,我们配置了sdk版本的 ...

  7. Android SDK与API版本的对应关系

    看教程.开发Android程序等很多地方,需要设置Android SDK的版本,而其要我们写的却是API版本的数字, 为了方便查看 Android SDK与API版本的对应关系 我在SDK Manag ...

  8. 【转】Android SDK,ADT,API 版本的对应关系

    写对应关系之前,先了解一下几个名字的含义. 一. Android ADT: 按照官方网站的开发介绍:Android Development Tools (ADT) is a plugin for th ...

  9. 【android】安卓平台版本和API版本的对应关系

    安卓平台版本和API版本对应关系

随机推荐

  1. 如何用css给input的placeholder设置颜色

    我在做页面的时候遇到过这种情况,在input标签中有默认字,但是设计稿上的颜色和input标签中的placeholder的默认颜色不一致.虽然我们可以在js中写出,但是有点过于麻烦了. 所以我就用cs ...

  2. MySQL实现根据当前ID读取上一条和下一条记录

    以下为MySQL语句演示: SELECT * FROM t_news AS n ORDER BY n.`News_ID` 当前ID为4,读取上一条记录: ,; 当前ID为4,读取下一条记录: ,; 其 ...

  3. ZOJ 3202 Second-price Auction

    Second-price Auction Time Limit: 1 Second      Memory Limit: 32768 KB Do you know second-price aucti ...

  4. PHP对象在内存中的分配

    对像在PHP 里面和整型.浮点型一样,也是一种数据类,都是存储不同类型数据用的, 在运行的时候都要加载到内存中去用,那么对象在内存里面是怎么体现的呢?内存从逻辑上 说大体上是分为4 段,栈空间段.堆空 ...

  5. Git版本控制工具安装与配置

    这里太多,我写在这里方便复制: sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-dev ...

  6. Flask系列(八)flask-session组件

    一.简介 flask-session是flask框架的session组件,由于原来flask内置session使用签名cookie保存,该组件则将支持session保存到多个地方,如: redis:保 ...

  7. POJ3070:Fibonacci(矩阵快速幂模板题)

    http://poj.org/problem?id=3070 #include <iostream> #include <string.h> #include <stdl ...

  8. PAT 1079 Total Sales of Supply Chain[比较]

    1079 Total Sales of Supply Chain(25 分) A supply chain is a network of retailers(零售商), distributors(经 ...

  9. PAT 1080 Graduate Admission[排序][难]

    1080 Graduate Admission(30 分) It is said that in 2011, there are about 100 graduate schools ready to ...

  10. docker——libnetwork插件网络功能

    从1.7.0版本开始,Docker正是把网络和存储这两部分的功能都以插件化形式剥离出来,允许用户通过指令来选择不同的后端实现.剥离出来的独立容器网络项目叫libnetwork,从名字就能看出,它希望将 ...