kotlin version that is used for building with gradle (1.1.2-5) differs from the one bundled into the IDE plugin (1.1.2-4)

Android StudioKotlin

Android Studio Problem Overview


Has anyone solved this issue?

> kotlin version that is used for building with gradle (1.1.2-5) differs from the one bundled into the IDE plugin (1.1.2-4)

I am using AS 3.0 Canary 4

Android Studio Solutions


Solution 1 - Android Studio

I followed Miha_x64's advice and upgraded the plugin which solved my problem:

> Tools -> Kotlin -> Configure Kotlin Plugin Updates -> Check for updates now

My version of Android Studio is:

Android Studio 3.0.1
Build #AI-171.4443003, built on November 9, 2017

Solution 2 - Android Studio

In my case, I converted Java to Kotlin and I have already Kotlin installed with lower version. So I updated it.

Tools -> Kotlin -> Configure Kotlin Plugin Updates then Check for updates now then choose Stable

Kotlin .

But it didn't update my version in the build.gradle file automatically. Because it detected a newer version and differs from the old one.

So I manually updated my version to the latest from

ext.kotlin_version = '1.0.0' to ext.kotlin_version = '1.2.41'

buildscript {
    ext.kotlin_version = '1.2.41'

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

Solution 3 - Android Studio

There's an issue in Android Studio 3.0 Canary 4 that prevents it from loading the updated version of the Kotlin plugin. You can ignore the warning shown by the Kotlin plugin in build.gradle until a newer version of Android Studio 3.0 is released.

Solution 4 - Android Studio

I also had the same issue, I am using Android Studio 3.2.1

Change the Kotlin version of your project build.gradle file(not module build.gradle file) to latest(at the moment it is 1.3.11)

ext.kotlin_version = '1.3.11'

then there will be notification call Kotlin migration, click Run migrations link on the notification.

Solution 5 - Android Studio

add this in your build gradle app

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionraditya gumayView Question on Stackoverflow
Solution 1 - Android StudiojpihlView Answer on Stackoverflow
Solution 2 - Android StudioRoCk RoCkView Answer on Stackoverflow
Solution 3 - Android StudioyoleView Answer on Stackoverflow
Solution 4 - Android Studiouser158View Answer on Stackoverflow
Solution 5 - Android Studioreza rahmadView Answer on Stackoverflow