Android Studio 2.3.3; Kotlin Plugin: 1.1.4; Kotlin Compiler: Kotlin to JVM: 1.6.
Android Studio > New Project > Configure Kotlin in Project action adds
reference for kotlin-stdlib-jre7 to gradle file.
I would expect kotlin-stdlib as we Kotlin target JVM is 1.6.
Have not found good explanation.
E.g. this answer states that
The kotlin-stdlib-jre7 artifact is not supposed to work on Android, which currently supports only Java 6 platform. When targeting Android, you should use kotlin-stdlib, which is built for JRE 6
Best Answer
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 librarieskotlin-stdlib-jre7
andkotlin-stdlib-jre8
in 1.1. This libraries add specific features for Java 7 and Java 8, and includekotlin-stdlib
as a transitive dependency. See also the Kotlin 1.1 release notes: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:And: