4 Answers

23
votes

I Faced the same problem on Android Studio version 3.2, and I changed this:

ext.kotlin_version = '1.2.50'

in build.gradle(Project:"Your Project Name") File,

to this:

ext.kotlin_version = '1.2.51'

and Sync now or restarted Android Studio.

7
votes

I had the same problem, I am not sure my answer is correct. But you can try it. I changed this:

ext.kotlin_version = '1.2.50-eap-62'

to this:

ext.kotlin_version = '1.2.41'

and restarted Android studio.

3
votes

I faced the same problem when i update my Android Studio. i solved

buildscript {
ext.kotlin_version = '1.3.10'

repositories {
    mavenCentral()
}

dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

If you used classpath 'io.fabric.tools:gradle:1.25.1'

than you need to change classpath 'io.fabric.tools:gradle:1.+'

0
votes

Recently I too had the same problem after updating my android studio to 3.5.

I tried the following to resolve this issue.

  1. Changed kotlin version to 1.3.21 (ext.kotlin_version = '1.3.21')

    buildscript {

    ext.lifecycleVersion = '2.2.0-alpha03'
    
    ext.kotlin_version = '1.3.21'
    
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
    
    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
    }
    

    }

  2. Select File menu -> Invalidate cache / Restart

Then all worked fine for me after synched the project.