Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio 3: Outdated Kotlin Runtime

I don't use kotlin in my current a project, but always showing following warning:

Step1

When I click to "Update runtime" will be show following popup:

Step2

And here dependencies who i used:

Step3

Anybody know how to solve this google trick?

**Edit

This is bug of Android studio, because i don't using kotlin. If any body will be any idiom how to fix it can add extra answer to this a question

like image 422
Fussball Treff Avatar asked Nov 16 '17 05:11

Fussball Treff


People also ask

How do I update my Kotlin?

Update to a new release You can check the Kotlin version in Tools | Kotlin | Configure Kotlin Plugin Updates. If you have projects created with earlier Kotlin versions, change the Kotlin version in your projects and update kotlinx libraries if necessary.

How do I change my Kotlin Android version?

In your Android studio, Go to Tools -> Kotlin -> Configure Kotlin Updates. Save this answer.

Is Kotlin installed with Android studio?

The Kotlin plugin is bundled with each Android Studio release. However, it still needs to be updated to the latest version to avoid compatibility issues. To update the plugin, on the Android Studio welcome screen, select Plugins | Installed. Click Update next to Kotlin.


1 Answers

Add this into your build.gradle (Project)

buildscript {
ext.kotlin_version = '1.1.60'
repositories {
    google()
    jcenter()
}
dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

And this code into your build.gradle (Module)

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}

This will update your Kotlin version. You can find more in Kotlin Targeting Android

like image 103
Muhammad Hannan Avatar answered Sep 23 '22 13:09

Muhammad Hannan