我在这个android项目上遇到了问题,无法解决。首先,我尝试将jCenter()改为maveCentral(),但是仍然不起作用。
下面是错误:
A problem occurred configuring root project .
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30-release-412.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.30-release-412/kotlin-gradle-plugin-1.5.30-release-412.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.30-release-412/kotlin-gradle-plugin-1.5.30-release-412.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html下面是gradle文件:
buildscript {
ext.kotlin_version = "1.5.30-release-412"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0-beta03"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}发布于 2021-11-10 03:00:29
我在Maven Repo上查了一下,似乎1.5.30-release-412并不存在,也许你可以考虑使用其他版本,也许1.5.30
buildscript {
ext.kotlin_version = "1.5.30"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0-beta03"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}https://stackoverflow.com/questions/69906285
复制相似问题