【问题标题】:Flutter android application is not running while trying to execute the command "flutter run"尝试执行命令“flutter run”时,Flutter android 应用程序未运行
【发布时间】:2018-03-10 05:53:12
【问题描述】:

运行 Gradle 时出错:

Exit code 1 from: C:\Users\Ashwin\demo\android\gradlew.bat app:properties:
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details

FAILURE:构建失败并出现异常。

出了什么问题: 配置根项目“android”时出现问题。

Could not resolve all dependencies for configuration ':classpath'.
Could not load module metadata from C:\Users\Ashwin.gradle\caches\modules-2\metadata-2.23\descriptors\com.android.tools.external.com-intellij\intellij-core\26.0.1\da4190074d36b292f150a83ad82b6bb8\descriptor.bin

尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。

通过https://help.gradle.org获得更多帮助

在 27 秒内构建失败

以错误结束:请检查 android/ 文件夹中的 Gradle 项目设置。

【问题讨论】:

标签: android dart flutter


【解决方案1】:

你需要去

  1. android/app/gradle/wrapper/
  2. 打开 gradle-wrapper.properties
  3. 然后像我一样更新你的 gradle 版本,我将我的从 distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-all.zip 更新到 distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip

感谢愉快的编码

【讨论】:

    猜你喜欢
    • 2021-08-29
    • 2021-06-26
    • 1970-01-01
    • 1970-01-01
    • 2021-05-04
    • 2020-08-26
    • 2019-04-02
    • 2018-09-06
    • 1970-01-01
    相关资源
    最近更新 更多