Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update Kotlin.Runtime in Android Studio

Windows 10, Android Studio 3.0.1. Just fired it up and got the "there's a new version available, update?". I updated. Now I get "Outdated Kotlin.Runtime. Version of Kotlin runtime is outdated in several libraries" followed by a long URL.

So I need to update the Kotlin Runtime. How do I do that?

like image 664
Snotnose Avatar asked Jan 31 '18 22:01

Snotnose


4 Answers

You can update and install new Kotlin plugin from Android Studio itself. See screenshot from Android Studio

like image 69
Jose Avatar answered Oct 01 '22 02:10

Jose


Open the "root" build.gradle of your project. At the very beginning you should find something like this:

buildscript {
ext.kotlin_version = '1.1.51'
repositories {
    google()
    jcenter()
}

change te second line to looks like:

ext.kotlin_version = '1.2.30'

How you should know exactly to which version to update the Kotlin runtime? Easy, take a look to the Event Log in Android Studio, the Kotlin plugin will complain there: Event Log message

like image 28
Gille Avatar answered Oct 01 '22 03:10

Gille


After version 3 of Android Studio you don't need the Kotlin plugin, just uncheck it. The Kotlin version will look after itself, via a metadependency variable.

like image 22
Keith Allpress Avatar answered Oct 01 '22 01:10

Keith Allpress


In latest version of android studio it is even easier:

enter image description here

Then:

enter image description here

Finally restart Android Studio.

like image 41
F.Mysir Avatar answered Oct 01 '22 03:10

F.Mysir