How to configure Kotlin version in Android Studio?

I configured the Kotlin version in the build.gradle project. But in Other Settings-> Kotlin Compiler it shows an older version. How to fix it?

project's build.gradle

Android Studio's Settings

+5
source share
3 answers

This does not show an obsolete version. Say your plugin version is "1.1.3", so your compiler version is "1.1" not "1.1.3". Now, if you upgrade your kotlin by going to

Tools> Kotlin> Configure Kotlin Updates

for the earlier version of access "1.2", as shown in the screenshot below, you can see "1.2" in the settings of your Kotlin compiler.

enter image description here

+6
source

In your Android studio, Go to Tools β†’ Kotlin β†’ Configure Kotlin Updates.

You can check more detailed information https://segunfamisa.com/posts/setting-up-android-studio-for-kotlin-development

+1
source

Open gradle project and add this line

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.3-2" 

After the gradle configuration project, you need to add the Gradle application. add kotlin plugin after android plugin like this

 apply plugin: 'com.android.application' apply plugin: 'kotlin-android' 

And the last step is add dependencies

  compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.3-2" 

And click on SYNC Project.

0
source

Source: https://habr.com/ru/post/1269922/


All Articles