首页 > 解决方案 > 尝试运行 web 后颤振 macos 桌面构建失败

问题描述

最新版本的flutter和dart我在配置中启用了flutter 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

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

标签: macosflutterbuild

解决方案


运行后解决

$ 颤振预缓存 -a

适用于所有平台


推荐阅读