gpt4 book ai didi

gradle - 如何修复 Flutter 中的 gradle?

转载 作者:IT王子 更新时间:2023-10-29 07:02:52 26 4
gpt4 key购买 nike

我在运行我的项目时遇到此错误:

  • Error running Gradle: ProcessException: Process

    "/Users/jacobgjrva/AndroidStudioProjects/stage_me/android/gradlew" exited abnormally:

    Command: /Users/jacobgjrva/AndroidStudioProjects/stage_me/android/gradlew app:properties

    Finished with error: Please review your Gradle project setup in the android/ folder.

有人知道怎么解决吗?提前致谢!

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}

allprojects {
repositories {
google()
jcenter()
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}

subprojects {
project.evaluationDependsOn(':app')
}

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

最佳答案

使用 --stacktrace 运行 gradlew 命令以获取错误的详细信息。

同时检查 build.gradle 文件。
在答案中报告的 block 中,{ } 位置错误。

allprojects {
repositories {
google()
jcenter()
}
} //it is missing in your code

和:

   task clean(type: Delete) {
delete rootProject.buildDir
}
}// You have to remove this.

关于gradle - 如何修复 Flutter 中的 gradle?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56661225/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com