Xcode 升级后,带有多个命令的 Flutter iOS 构建失败错误 [英] Flutter iOS build failure error with Multiple commands after the Xcode upgrade
本文介绍了Xcode 升级后,带有多个命令的 Flutter iOS 构建失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Mac 中升级到 Xcode 10.0 版本后 Flutter iOS 构建失败.
Flutter iOS build fails after upgrading to Xcode 10.0 version in mac.
Nagendras-MacBook-Pro:uaenumber nagendra$ flutter run
Launching lib/main.dart on iPhone X in debug mode...
Starting Xcode build...
Xcode build done. 1.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: Multiple commands produce '/Users/dev/Documents/projects/Personal/uaenumber/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/dev/Documents/projects/Personal/uaenumber/ios/Flutter/Flutter.framework' to '/Users/dev/Documents/projects/Personal/uaenumber/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase "[CP] Embed Pods Frameworks"
warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with "Use of deprecated Swift 3 @objcinference" logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target. (in target 'Runner')
warning: ignoring duplicated output file: '/Users/nagendra/Documents/projects/Personal/uaedialer/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone X.
Xcode 版本 - 10.0 (10A255)
Xcode Version - 10.0 (10A255)
我尝试重新创建项目并将所有源文件复制到新的项目文件夹中,但没有解决问题.
I tried to recreate the project and copied all the source files to the new project folder but it does not resolve the issue.
推荐答案
这个解决方案对我有用.
This solution worked for me.
- 打开 ios/Runner.xcworkspace 在项目中选择Runner项目导航器侧边栏.
- 在主视图中,选择 Runner 目标,然后选择 Build Phases 选项卡.
- 展开 Embed Frameworks 阶段并从嵌入式框架列表.
- 点击 - 从列表中移除 Flutter.framework(一定要保留应用框架).
这篇关于Xcode 升级后,带有多个命令的 Flutter iOS 构建失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文