Android supports Java 7 for some years already. In fact, partial support for Java 8 is on the way, at the beginning by means of Jack toolchain and currently by means of desugaring in the default toolchain.
So, kotlin-stdlib-jre7
is perfectly fine.
As you can see in this answer, kotlin-stdlib
got two additional extension libraries kotlin-stdlib-jre7
and kotlin-stdlib-jre8
in 1.1. This libraries add specific features for Java 7 and Java 8, and include kotlin-stdlib
as a transitive dependency. See also the Kotlin 1.1 release notes:
Java 8 standard library support
There are now separate versions of the standard library supporting the new JDK APIs added in Java 7 and 8. If you need access to the new APIs, use kotlin-stdlib-jre7 and kotlin-stdlib-jre8 maven artifacts instead of the standard kotlin-stdlib. These artifacts are tiny extensions on top of kotlin-stdlib and they bring it to your project as a transitive dependency.
Kotlin plugin in current versions of Android Studio add kotlin-stdlib-jre7
as a dependency when configuring Kotlin in the project, as Android Studio and build tools support Java 7 in a backward compatible way since Android Studio 0.3.2, released in October 2013. See also Does Android support JDK 6 or 7. Specifically, release notes state:
The main feature in this release is support for Android KitKat:
Support for language features like the diamond operator, multi-catch, try-with-resources, strings in switches, etc.
When creating a new project, you can specify a source language level:
And:
Note that you can use all these language features not just with Android KitKat, but with older versions of Android too! There is one exception to that: try-with-resources, which will require minSdkVersion 19.