我想更新Android Gradle插件,但我收到此错误:
错误:找不到org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.31。
这些是我添加来更新Android Gradle插件(build.gradle文件)的行:
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'
}
}
答案 0 :(得分:0)
您缺少一些存储库( jcenter )和一些依赖项( kotlin-gradle-plugin )。这就是为什么找不到Kotlin。
您的build.gradle(Project:android)
文件应如下所示:
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
}