【问题标题】:Flutter apps not running on androidFlutter 应用程序无法在 Android 上运行
【发布时间】:2020-03-16 13:57:48
【问题描述】:

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

注意:无论项目如何都会发生错误,即使新创建的项目处于颤动状态,它也总是会发生。谢谢

* 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
}

【问题讨论】:

    标签: gradle flutter


    【解决方案1】:

    尝试在项目文件夹上运行flutter clean,然后再次运行。

    【讨论】:

      猜你喜欢
      • 2022-08-03
      • 2020-04-30
      • 2023-02-04
      • 2022-07-05
      • 2021-08-23
      • 2019-08-03
      • 2018-04-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多