1

My android studio is sending me this warning:

Outdated Kotlin Runtime

Your version of Kotlin runtime in 'Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.2.10@jar' library is 1.2.10-release-109 (1.2.10), while plugin version is 1.2.41-release-Studio3.1-1.

Runtime library should be updated to avoid compatibility problems.

This warning appear every time I open the project and it finishes the Gradle sync How do I update the Kotlin runtime?

I have found questions about it, but all of them the problema was that the plugin version that was below runtime and needed to update the plugin version on the build.gradle file, but my case is the opposite. My build.gradle is like this:

buildscript {
    ext.kotlin_version = '1.2.41'
    ext.anko_version='0.10.5'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        classpath 'com.google.gms:google-services:3.2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

If I try to downgrade the plugin to 1.2.10, them the IDE gives a warning that the plugin is outdated.

Community
  • 1
  • 1
Erik
  • 1,311
  • 1
  • 11
  • 17
  • What's your `dependencies` block in `app` module's `build.gradle`? – ice1000 May 17 '18 at 02:32
  • Make sure you have `implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"` under `dependencies` in your app module's `build.gradle` file. – CEO tech4lifeapps May 17 '18 at 10:34
  • The kotlin plugin does version management for you, so you don't need to set the version in the dependencies section. Can have `compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk7'`. As others have suggested, you''re most likely defining an explicit version in your dependencies block, and it's still at 1.2.10 – Mikezx6r May 19 '18 at 11:00
  • I don't really know what happens, but the warning stopped appearing. Maybe it was some cache or something, but after some close and open of android studio through development course without even changing any gradle file the warning stopped appearing. – Erik May 19 '18 at 14:51
  • Possible duplicate of [Outdated Kotlin Runtime warning in Android Studio](https://stackoverflow.com/questions/43928118/outdated-kotlin-runtime-warning-in-android-studio) – Zoe May 21 '18 at 09:54

0 Answers0