Outdated Kotlin Runtime Warning in Android Studio

Android studio 3: Outdated Kotlin Runtime

Add this into your build.gradle (Project)

buildscript {
ext.kotlin_version = '1.1.60'
repositories {
google()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
}
}

And this code into your build.gradle (Module)

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

dependencies {
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}

This will update your Kotlin version. You can find more in Kotlin Targeting Android

Outdated Kotlin Runtime

Go to your build.gradle file.
Change

ext.kotlin_version = '1.1.2-4'

to

ext.kotlin_version = '1.1.3-2' 

For future references, visit this link to see the latest update and update it accordingly in your build.gradle file.

Android Studio 3: latest plugin version installed but outdated runtime warning

It seems like your build.gradle needs changing. Do it like this:

You are using stdlib-jre7this instead of stdlib-jdk7 because stdlib-jre7 is deprecated now, that's why you are getting this warning.

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.prolificinteractive:material-calendarview:1.4.0'
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support:multidex:1.0.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

}

allprojects {
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
google()
}


Related Topics



Leave a reply



Submit