Development issue/problem:

Yesterday I updated the Android Studio version and the Kotlin plugin.

Studio version of Android : 3.1.2

Kotlin’s version: 1.2.41

When I create an Android project with this configuration, I get a warning from the Kotlin compiler that says

Modified as suggested, I get the following error.

How can I solve this problem?

Solution 1:

Go to Tools > Kotlin > Configure Kotlin Plugin Updates and search for
-Updates, then replace jre with jdk in your application evaluation file.


Solution 2:

Important update

The JDK version must be checked before configuring.

The Kotlin ranks configuration page contains detailed information on this subject.

First check your version of Kotlin in the gradle file.

if (kotlin_version == 1.2.x ) (use jdk NOT jre)

First check your jdk version in File > Project structure.

Or visit build.gradle

compileOptions {
compatibility }

if (jdk_version == 1.8)


if (jdk_version == 1.7)


if (jdk_version < 1,7)


otherwise, if (the jdk version is not installed in the project structure)


Because Android Studio comes with jdk 1.8 as of version 2.2.1.

2. also as ( kotlin_version == ‘1.1.x’) (use jre NOT jdk)

implementationorg.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version // of jre8

Kotlin?version update

You can update the version of Kotlin from the Tools > Kotlin > Configure Kotlin Updates menu.

Solution 3:

Something is temporarily importing these libraries. To find out what depends on Mr. Gradle’s work, just ask around.

In my case it was io.vertx:vertx-lang-kotlin-coroutines:3.5.1.

If there is no update for this addiction, there is nothing you can do about it.

Solution 4:

After reading topic
of the kotlin cradle scenario, I discovered that some doughnuts

If you focus on JDK 7 or JDK 8, you can use extended versions of the standard Kotlin library, which include additional API extensions added in more recent versions of the JDK. Use one of the following dependencies instead of cotlin-stdlib:
compiles org.jetbrains.kotlin:kotlin-stdlib-jdk7
compiles org.jetbrains.kotlin:kotlin-stdlib-jdk8

In my project I used the implementation org.jetbrains.kotlin:kotlin-stdlib-jdk8. I think it’s because of theOptions compilation that’s in build.graddle.

compileOptions {
compatibility }

Solution No 5:

You must exchange the codes below:


Pas jre > jdk


Good luck!

Related Tags:

kotlin-stdlib-jdk7 vs kotlin-stdlib-jdk8,kotlin-stdlib-common vs kotlin-stdlib,kotlin stdlib jdk7 maven,android kotlin-stdlib-jdk8,error: failed to resolve: org jetbrains kotlin kotlin-stdlib-jre7 1.3 10,org jetbrains kotlin kotlin stdlib jdk7 kotlin version,org jetbrains kotlin kotlin-stdlib-jre7:$kotlin_version,org jetbrains kotlin kotlin-stdlib-jdk7 maven

Categories: World Tech