尝试运行 web 后颤振 macos 桌面构建失败

Posted

技术标签:

【中文标题】尝试运行 web 后颤振 macos 桌面构建失败【英文标题】:flutter macos desktop build failed after trying run web 【发布时间】:2020-03-24 07:19:33 【问题描述】:

最新版本的颤振和飞镖 我在配置中启用了颤振 macos-windows-linux 和 web 并检查了它

启动macos桌面运行一切正常,然后尝试在chrome上运行web,一切都很棒

当我尝试在 macos 上再次运行应用程序时......构建失败错误

flutter run -d macOS -v ....的结果是

[   +2 ms] Building macOS application...
[   +2 ms] executing: /usr/bin/env xcrun xcodebuild -workspace /Users/HAFEZ/Desktop/project zero/flutter desktop
test/testapp/macos/Runner.xcworkspace -configuration Debug -scheme Runner -derivedDataPath /Users/HAFEZ/Desktop/project zero/flutter
desktop test/testapp/build/macos OBJROOT=/Users/HAFEZ/Desktop/project zero/flutter desktop
test/testapp/build/macos/Build/Intermediates.noindex SYMROOT=/Users/HAFEZ/Desktop/project zero/flutter desktop
test/testapp/build/macos/Build/Products COMPILER_INDEX_STORE_ENABLE=NO
[+2741 ms] User defaults from command line:
[        ]     IDEDerivedDataPathOverride = /Users/HAFEZ/Desktop/project zero/flutter desktop test/testapp/build/macos
[        ] Build settings from command line:
[        ]     COMPILER_INDEX_STORE_ENABLE = NO
[        ]     OBJROOT = /Users/HAFEZ/Desktop/project zero/flutter desktop test/testapp/build/macos/Build/Intermediates.noindex
[        ]     SYMROOT = /Users/HAFEZ/Desktop/project zero/flutter desktop test/testapp/build/macos/Build/Products
[+1410 ms] note: Using new build system
[   +9 ms] note: Planning build
[ +102 ms] note: Constructing build description
[ +638 ms] Build system information
[   +2 ms] error: Cycle inside Flutter Assemble; building could produce unreliable results. This usually can be resolved by moving the
shell script phase 'h' so that it runs before the build phase that depends on its outputs.
[   +1 ms] Cycle details:
[   +1 ms] → That command depends on command in Target 'Flutter Assemble': script phase “Run Script”
[   +2 ms] ○ That command depends on command in Target 'Flutter Assemble': script phase “Run Script”
[   +2 ms] warning: missing creator for mutated node: ('/Users/HAFEZ/Desktop/project zero/flutter desktop test/testapp/macos/desktop')
(in target 'Flutter Assemble' from project 'Runner')
[   +2 ms] warning: missing creator for mutated node: ('/Users/HAFEZ/Desktop/project zero/flutter desktop
test/testapp/macos/zero/flutter') (in target 'Flutter Assemble' from project 'Runner')
[   +3 ms] ** BUILD FAILED **
[  +52 ms] Building macOS application... (completed in 5.0s)
[   +7 ms] "flutter run" took 18,373ms.
Build process failed

不是全部,但我认为重要的是什么

【问题讨论】:

运行后解决 【参考方案1】:

运行后解决

$flutter precache -a

适用于所有平台??

【讨论】:

以上是关于尝试运行 web 后颤振 macos 桌面构建失败的主要内容,如果未能解决你的问题,请参考以下文章

在颤振中构建应用程序 2 次后构建失败

Xcode 构建和运行应用程序工作但存档失败(颤振)

运行颤振桌面应用程序时出现CMake错误

我在 android studio 中运行我的颤振项目并尝试使用 iPhone 12 模拟器,但 Xcode 构建每次都失败

Mac OS Flutter 构建 appbundle 失败:密钥库格式无效

在颤振构建网站后没有显示构建文件不工作显示空白