gpt4 book ai didi

gradle - Flutter 应用程序无法在 Android 上运行

转载 作者:行者123 更新时间:2023-12-03 05:31:50 25 4
gpt4 key购买 nike

应用程序没有在 android 上运行,但在 ios 上运行良好,错误表示 gradle 存在问题,尽管原生 android 项目在 android studio 中运行良好,我在 stackoverflow 上尝试了 google 和其他线程但没有运气。**

注意:无论项目如何都会发生错误,即使新创建的项目在 flutter 中也会发生。谢谢

* Error running Gradle:

ProcessException: Process "/Users/apple/Documents/flutter_work/tqtqt/android/gradlew" exited abnormally:

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:

Unable to start the daemon process.

This problem might be caused by incorrect configuration of the daemon.

For example, an unrecognized jvm option is used.

Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.10.2/userguide/gradle_daemon.html

Please read the following process output to find out more:

-----------------------

Error: Could not find or load main class org.gradle.launcher.daemon.bootstrap.GradleDaemon

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Command: /Users/apple/Documents/flutter_work/tqtqt/android/gradlew app:properties

Please review your Gradle project setup in the android/ folder.

build.gradle


buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

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
}

最佳答案

尝试运行flutter clean在项目文件夹上并再次运行它。

关于gradle - Flutter 应用程序无法在 Android 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58961306/

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