I want to update the Android Gradle plugin but Im getting this error:
ERROR: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.31.
Those are the lines I added to update the Android Gradle plugin (build.gradle file):
buildscript {
repositories {
// Gradle 4.1 and higher include support for Google's Maven repo using
// the google() method. And you need to include this repo to download
// Android Gradle plugin 3.0.0 or higher.
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
}
}
You are missing some repositories(jcenter) and some dependencies(kotlin-gradle-plugin). That's why Kotlin cannot be found.
Your build.gradle(Project:android)
file should look something like this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:3.4.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.31"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With