//Build.VERSION.SDK_INT 如果23的话Android 6.0.

22 Android 5.1 Lollipop

23 Android 6.0  Marshmallow(棉花糖)

24 Android 7.0 Nougat 牛轧糖



平台版本

API 级别

版本代码

备注

Android 5.0

21

LOLLIPOP 棒棒糖


Android 4.4W

20

KITKAT_WATCH

KitKat for Wearables Only

Android 4.4

19

KITKAT


Android 4.3

18

JELLY_BEAN_MR2


Android 4.2, 4.2.2

17

JELLY_BEAN_MR1


Android 4.1, 4.1.1

16

JELLY_BEAN


Android 4.0.3, 4.0.4

15

ICE_CREAM_SANDWICH_MR1


Android 4.0, 4.0.1, 4.0.2

14

ICE_CREAM_SANDWICH

Android 3.2

13

HONEYCOMB_MR2


Android 3.1.x

12

HONEYCOMB_MR1


Android 3.0.x

11

HONEYCOMB


Android 2.3.4
Android 2.3.3

10

GINGERBREAD_MR1


Android 2.3.2
Android 2.3.1
Android 2.3

9

GINGERBREAD

Android 2.2.x

8

FROYO


Android 2.1.x

7

ECLAIR_MR1


Android 2.0.1

6

ECLAIR_0_1

Android 2.0

5

ECLAIR

Android 1.6

4

DONUT


Android 1.5

3

CUPCAKE


Android 1.1

2

BASE_1_1


Android 1.0

1

BASE




if(Build.VERSION.SDK_INT>23){
//处理Android 6.0的情况
}