Flutter运行出现iOS错误:Multiple commands produce '/Users/yuanzhiying/Library/Developer/Xcode/DerivedDat...

Xcode中运行flutter的iOS项目出现的错误信息:

Showing Recent Messages
:-1: Multiple commands produce 'Flutter.framework':

1) Target 'Runner' has copy command from '/Users/yuanzhiying/cocos-embed-flutter/frameworks/runtime-src/flutter_module/.ios/Flutter/engine/Flutter.framework' to '/Users/yuanzhiying/Library/Developer/Xcode/DerivedData/Runner-eptbkhpzfgbvcachmhewftmvxjdp/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'

2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”

参考文章:MULTIPLE COMMANDS PRODUCE '/BUILD/IOS/DEBUG-IPHONESIMULATOR/RUNNER.APP/FRAMEWORKS/FLUTTER.FRAMEWORK
解决办法一:
Xcode中打开file-workspace settingsbuild system改为legacy build system,再次运行,即可成功运行。

解决方法二:
删除对应的Flutter.framework:


你可能感兴趣的:(Flutter运行出现iOS错误:Multiple commands produce '/Users/yuanzhiying/Library/Developer/Xcode/DerivedDat...)