安卓工作室上的错误"> Could not resolve all artifacts for configuration ':classpath'."



当我在Android Studio中创建新项目时,出现此错误:

A problem occurred configuring root project 'Hello World Android Studio'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

build.gradle中替换classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

带有

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0

然后单击重试

相关内容

最新更新