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. 【JavaScript算法】---插入排序

    一.什么叫做插入排序法 有一个已经有序的数据序列,要求在这个已经排好的数据序列中插入一个数,但要求插入后此数据序列仍然有序,这个时候就要用到一种新的排序方法——插入排序法 二.核心 插入排序的基本操作 ...

  2. 焦作网络赛K-Transport Ship【dp】

    There are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry th ...

  3. Dubbo学习记录

    参考资料: 官网 Dubbo详细介绍与安装使用过程

  4. 修改字段字符集 mysql 修改 锁表 show processlist; 查看进程 Waiting for table metadata lock

    ALTER TABLE `question` MODIFY COLUMN `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unico ...

  5. [SQL] 让特定的数据 排在最前

    MYSQL目前常用的两种方法,如下: 让值为"张三" 的数据排在最前. -- 方法一 end asc -- 方法二 select * from tableName where co ...

  6. Day01 html详解

      day01 html详解   1.html的简介     1.1 什么是html?         - HyperText Markup Language:超文本标记语言,网页语言         ...

  7. conda

    Conda是什么? Conda 是Anaconda下用于包管理和环境管理的命令行工具, Conda下一切都是包,包括Python和conda自己 Conda ≍ pip(包管理) + vitualen ...

  8. oracle高水位问题

    转自:https://blog.csdn.net/cnham/article/details/5987999 说到HWM,我们首先要简要的谈谈ORACLE的逻辑存储管理.我们知道,ORACLE在逻辑存 ...

  9. mysql 约束条件 auto_increment 自动增长起始值 布长 起始偏移量

    我们指定一个字段为自动增长,他默认从1开始自动增长,默认值为1,每次增长为1,步长为1 模糊查询 like % 代表任意个数字符 任意字符长度 查看mysql正在使用变量 show variables ...

  10. Jetty:配置概览-怎么配置Jetty

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/liuy_98_1001/article/details/27544671 Jetty POJO配置 ...