【问题标题】:Flutter build failed in ubuntu 19.10Flutter 构建在 ubuntu 19.10 中失败
【发布时间】:2020-04-07 11:07:59
【问题描述】:

我有一个在另一台机器上完美构建的颤振应用程序(ubuntu 18.04)。现在我正在使用 ubuntu 19.10 ,当我尝试使用 flutter run 命令运行这个应用程序时,它会抛出这些错误:

Launching lib/main.dart on Primo EF6 in debug mode...

FAILURE: Build failed with an exception.                                

* What went wrong:                                                      
Cannot create service of type PayloadSerializer using ToolingBuildSessionScopeServices.createPayloadSerializer() as there is a problem with parameter #2 of type PayloadClassLoaderFactory.
> Cannot create service of type PayloadClassLoaderFactory using ToolingBuildSessionScopeServices.createClassLoaderFactory() as there is a problem with parameter #1 of type CachedClasspathTransformer.

* 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                              

BUILD FAILED in 4s                                                      
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                         5.5s
Gradle task assembleDebug failed with exit code 1

我认为这是 gradle 问题。我正在使用flutter v1.12.13+hotfix.6

【问题讨论】:

    标签: android gradle flutter


    【解决方案1】:

    修复了这个问题。 .gradle 目录存在权限问题,它是 readonly 。所以更改权限可以解决这个问题。

    【讨论】:

      猜你喜欢
      • 2020-03-05
      • 1970-01-01
      • 1970-01-01
      • 2019-06-28
      • 2021-03-09
      • 2020-12-28
      • 2020-08-18
      • 2021-09-13
      • 2020-09-15
      相关资源
      最近更新 更多