Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I upgrade Kotlin version from 1.2.51 to 1.3 on Android Studio

I'm having some trouble upgrading the version of Kotlin to 1.3-M1 or 1.3-M2

I'm using 1.2.51 right now and the error I'm getting when I try using any newer versions like 1.3-M2 is:

Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3-M2.

I'm guessing it has been moved but I've looked al over and haven't found a solution.

Can anyone point me in the right direction?

like image 451
Aerim Avatar asked Oct 09 '18 16:10

Aerim


People also ask

How do I change my Kotlin Android version?

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

How can I change the Kotlin compiler version on Android Studio?

Go to Intellij Preferences -> Build, Execution, Deployment -> Kotlin Compiler. Update Language version and Api version to the one you wish. This should be the accepted answer.

In which file do we change the version of Kotlin in Android Studio?

Select your module in the Project window, and then select File > New, select any Android template, and then choose Kotlin as the Source language.


2 Answers

Thanks to yole and TheWanderer I found what was missing.

Here under the EAP-NEXT tab you can find the correct version of the kotlin plugin for IntelliJ/Android Studio.

So this is what I did to solve it:

1 - Android Studio -> Tools -> Kotlin -> Configure Kotlin Plugin Updates 2 - Select Early Access Preview 1.3 on the Update channel drop down(If you can't find it click again) 3 - What this answer says: On your project level build.gradle:

buildscript {
  repositories {
    maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
  }
}

repositories {
  maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
like image 188
Aerim Avatar answered Oct 12 '22 23:10

Aerim


To update to a prerelease version of Kotlin, as described in the blog post, you need to add the kotlin-eap repository to your build.gradle:

buildscript {
  repositories {
    maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
  }
}

repositories {
  maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
like image 26
yole Avatar answered Oct 13 '22 00:10

yole