gpt4 book ai didi

android - 错误 : Could not find org. jetbrains.kotlin :kotlin-stdlib-jdk8:1. 3.31

转载 作者:行者123 更新时间:2023-12-03 03:04:09 25 4
gpt4 key购买 nike

我想更新 Android Gradle 插件,但出现此错误:

ERROR: Could not find 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'
}
}

最佳答案

您缺少一些存储库(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
}

关于android - 错误 : Could not find org. jetbrains.kotlin :kotlin-stdlib-jdk8:1. 3.31,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56276693/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com