Xcode升级后,Flutter iOS构建失败错误,并带有多个命令 [英] Flutter iOS build failure error with Multiple commands after the Xcode upgrade

查看:114
本文介绍了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 doesn`t resolve the issue.

推荐答案

此解决方案对我有用。

This solution worked for me.


  1. 打开ios / Runner.xcworkspace在项目
    导航器侧栏中选择Runner项目。

  2. 在主视图中,选择运行器目标,然后选择构建阶段选项卡。

  3. 展开嵌入框架阶段,然后从中选择Flutter.framework
    嵌入式框架列表。

  4. 单击-从列表中删除Flutter.framework(请务必保留
    App.framework)。

  1. Open ios/Runner.xcworkspace Select the Runner project in the project navigator sidebar.
  2. In the main view, select the Runner target, then select the Build Phases tab.
  3. Expand the Embed Frameworks phase and select Flutter.framework from the embedded frameworks list.
  4. Click - to remove Flutter.framework from the list (be sure to keep App.framework).

这篇关于Xcode升级后,Flutter iOS构建失败错误,并带有多个命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆