【问题标题】:Kotlin error Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resyncKotlin 错误无法解析 Android 应用程序模块的 Gradle 配置。解决 gradle 构建问题和/或重新同步
【发布时间】:2022-01-23 20:48:03
【问题描述】:

在连接到 Firebase 时将 Android Studio 更新到最新版本后,出现以下错误。

Could not parse the Android Application Module's Gradle config. Resolve gradle build issues and/or resync.

项目 Gradle:-

buildscript {
    ext.kotlin_version = "1.4.32"
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.10'
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

【问题讨论】:

  • 你试过更新kotlin版本了吗?
  • 是的,它是最新的

标签: firebase android-studio kotlin


【解决方案1】:

最后,在谷歌搜索后,我找到了解决方案。我已经从 Module Gradle 中删除了下面的行并且它起作用了。

testImplementation 'junit:junit:'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-26
    • 1970-01-01
    • 2022-07-17
    • 2017-12-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多