【问题标题】:Android Studio:Could not resolve all artifacts for configuration ':classpath'Android Studio:无法解析配置“:classpath”的所有工件
【发布时间】:2021-07-28 02:55:39
【问题描述】:

我在Android Studio中新建了一个项目,弹出错误:

A problem occurred configuring root project 'About Me'.
> 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 kotlin gradle


【解决方案1】:

我刚刚关闭项目并重新启动它,错误消失了

【讨论】:

    【解决方案2】:

    试试这个:

    ext.kotlin_version = "1.5.0"
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    

    看起来服务器端有一些问题,只需将 kotlin 版本更改为 1.5.0 而不是 1.5.0-release-764

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-01
      • 2023-03-17
      • 1970-01-01
      • 1970-01-01
      • 2021-06-04
      • 1970-01-01
      • 2020-01-31
      相关资源
      最近更新 更多