Gradle Sync Issue Kotlin after Android 3.1 Stable Update

Joker picture Joker · Mar 27, 2018 · Viewed 9k times · Source

Hey after updating Android Studio to 3.1 Stable version i am getting following error to all my projects. Any help will be appreciated.

Could not download kotlin-reflect.jar (org.jetbrains.kotlin:kotlin-reflect:1.1.3-2): No cached version available for offline mode

Answer

0xAliHn picture 0xAliHn · Mar 27, 2018

I guess its Kotlin version related issue. First try to update your kotling version. I guess latest version is 1.2.31

The version of Kotlin to use is usually defined as the kotlin_version property:

buildscript {
    ext.kotlin_version = '1.2.31'

    repositories {
        mavenCentral()
    }

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

For details: https://kotlinlang.org/docs/reference/using-gradle.html