# AndroidVersion

# AndroidVersion

```
@Incubating open class AndroidVersion
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                             ||
| ↳ | [com.android.build.api.variant.AndroidVersion](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/AndroidVersion#) |

## Summary

|                                                                                                                                                                           ### Public constructors                                                                                                                                                                           ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [<init>](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/AndroidVersion#%3Cinit%3E(kotlin.Int,%20kotlin.String))`(`apiLevel:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `codename:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?` `=` null)` <br /> |

|                                                                                                                                             ### Properties                                                                                                                                             ||
|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)        | [apiLevel](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/AndroidVersion#apiLevel:kotlin.Int) SDK version codes mirroring ones found in Build#VERSION_CODES on Android. |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)? | [codename](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/AndroidVersion#codename:kotlin.String) Preview versions of the platform are identified by a code name.        |

## Public constructors

### \<init\>

```
AndroidVersion(
    apiLevel: Int, 
    codename: String? = null)
```

## Properties

### apiLevel

```
val apiLevel: Int
```

SDK version codes mirroring ones found in Build#VERSION_CODES on Android.  

### codename

```
val codename: String?
```

Preview versions of the platform are identified by a code name. Their API level is usually set to the value of the previous platform.