小编Pyt*_*ter的帖子

输出程序时 Gradle 构建错误

当我使用 Gradle 在 Android Studio 中输出我的 Android 应用程序时,我遇到了一个问题,我收到这样的错误,错误出现在同步中,然后我尝试同步,AVD 正在工作,并且同步有效,但现在,也许我在使用 Gradle 输出时遇到同样的问题,我认为这可能会有所帮助,我重置了我的笔记本电脑,所以所有内容都被删除,然后我重新安装了 Android Studio 和所有内容,这是我的第一次测试,并运行 Gradle也。

这是我得到的 build.gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.5.10"
    repositories {
        google()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
        classpath "org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10"
 
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
 
allprojects {
    repositories {
        google() …
Run Code Online (Sandbox Code Playgroud)

android gradle kotlin android-studio

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

android-studio ×1

gradle ×1

kotlin ×1