【问题标题】:A problem occurred configuring root project. What do I need to do?配置根项目时出现问题。我需要做什么?
【发布时间】:2021-05-13 01:51:46
【问题描述】:

我刚刚创建了一个新的 android 项目来测试与我的主要项目不同的东西,这发生了。我试了几次,每次都报同样的错误。

A problem occurred configuring root project 'login_test'.
> 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

【问题讨论】:

    标签: java android android-studio kotlin


    【解决方案1】:

    尝试更改根目录下build.gradle中的kotlin版本。我这里用的是1.3.72

    buildscript {
    ext.kotlin_version = '1.0.0'
    ext.kotlin_version = "1.3.72"
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.1"
        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
    }
    }
    

    【讨论】:

      猜你喜欢
      • 2020-10-17
      • 2020-08-24
      • 2021-05-15
      • 2021-04-09
      • 2020-06-28
      • 1970-01-01
      • 1970-01-01
      • 2020-11-23
      • 1970-01-01
      相关资源
      最近更新 更多