Multiple commands produce '/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework

Flutter 运行在Android上没有问题,在IOS上出现以下问题:

Multiple commands produce '/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework

Target 'Runner' has copy command from '/ios/Flutter/Flutter.framework' to '/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
warning: ignoring duplicated output file: '//build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' (in target 'Runner')
note: Using new build systemnote: Planning buildnote: Constructing build description
Mac 10.14 Beta
Xcode 10 beta

使用Xcode 10构建的所有Flutter项目都会有该问题。在使用插件时,有两个竞争构建操作将Flutter.framework复制到构建应用程序Frameworks目录中:

Embed框架为Runner项目构建阶段
[CP]嵌入Pods框架构建pod安装在项目中创建的阶段。
第一项用于确保在没有插件的情况下将框架复制到构建的应用程序中(因此在Xcode项目中没有CocoaPods集成)。
第二项是因为Flutter的podspec将Flutter.framework声明为vended_framework,而CocoaPods会自动为CocoaPods依赖项的传递闭包中的每个这样的vended_framework添加一个复制步骤。

解决方案有两个
1、将XCODE的编译系统改为legacy build system,如下图所示
在这里插入图片描述
2:使用新的Xcode 10构建系统。
打开ios / Runner.xcworkspace
在项目导航器侧栏中选择Runner项目。
在主视图中,选择Runner目标,然后选择Build Phases选项卡。
展开Embed Frameworks阶段并从嵌入式框架列表中选择Flutter.framework。
单击 - 从列表中删除Flutter.framework(确保保留App.framework)。

文章地址:https://blog.csdn.net/u013560890/article/details/96476861

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值