【问题标题】:Flutter App stuck on "app running gradle task 'assembledebug..."Flutter App 卡在“app running gradle task 'assembledebug ...”
【发布时间】:2020-12-05 23:40:11
【问题描述】:

这是我的第一个颤振应用程序,我尝试运行颤振给出的示例,但它卡在此消息应用程序 running gradle task 'assembledebug.... 上,或者有时出现错误Exception: Gradle task assembleDebug failed with exit code 1。 尝试做类似问题中回答的所有事情。使用 sdk 版本 30、Android Studio 版本 3.1 和 Flutter 版本 1.20.1。

> Failed to transform artifact 'x86_debug.jar (io.flutter:x86_debug:1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54)' to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: C:\Users\dell\.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54\570a59b7be41f73458509975d3eefca7ad5561cf\x86_debug-1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54.jar.
         > Failed to transform 'C:\Users\dell\.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54\570a59b7be41f73458509975d3eefca7ad5561cf\x86_debug-1.0.0-c8e3b9485386425213e2973126d6f57e7ed83c54.jar' using Jetifier. Reason: Unexpected end of ZLIB input stream. (Run with --stacktrace for more details.)

* 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

【问题讨论】:

  • 你能告诉我错误吗
  • 在运行了几次之后构建现在失败了...异常:Gradle 任务 assembleDebug 失败,退出代码为 1。这是消息
  • 这没有帮助,将之前的其他行复制并粘贴到您的问题中
  • 您是否尝试过文件>无效缓存重启
  • 试过无效缓存/重启

标签: java android android-studio flutter mobile


【解决方案1】:

您是否尝试过使用flutter clean 进行干净构建?您能否发布更多错误和代码?

【讨论】:

    【解决方案2】:

    尝试清空缓存“C:\Users\dell.gradle\caches”并重新运行项目。您还应该在构建项目时检查事件日志错误。

    【讨论】:

      【解决方案3】:

      在您的 android studio 中,cd 到 android 目录,然后从终端运行: 毕业清洁 gradlew 构建 然后运行应用程序。 如果它不起作用,请尝试flutter clean。 同时删除用户目录中的 .gradle 文件夹。 这需要一些时间,但它会运行。

      【讨论】:

        猜你喜欢
        • 2020-05-25
        • 1970-01-01
        • 2023-03-09
        • 2020-04-18
        • 1970-01-01
        • 2020-10-04
        • 2020-08-22
        • 1970-01-01
        • 2020-05-23
        相关资源
        最近更新 更多