【问题标题】:Error "> Could not resolve all artifacts for configuration ':classpath'." on Android Studio [duplicate]错误 "> 无法解析配置 ':classpath' 的所有工件。"在 Android Studio [重复]
【发布时间】:2021-08-01 09:43:05
【问题描述】:

当我在 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


【问题讨论】:

标签: android android-studio kotlin


【解决方案1】:

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

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

然后点击再试一次

【讨论】:

    猜你喜欢
    • 2021-07-28
    • 1970-01-01
    • 1970-01-01
    • 2021-03-23
    • 2020-04-17
    • 2023-03-17
    • 1970-01-01
    • 1970-01-01
    • 2021-10-25
    相关资源
    最近更新 更多