error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist': 1) Target 'OptimalLive' has copy command from '/Users/uesr/Desktop/workSpace/SEALIVE/SeaLive1.1/OptimalLive/Info.plist' to '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist' 2) Target 'OptimalLive' has copy command from '/Users/uesr/Desktop/workSpace/SEALIVE/SeaLive1.1/OptimalLive/Server/Masonry/Info.plist' to '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist' 3) Target 'OptimalLive' has process command with input '/Users/uesr/Desktop/workSpace/SEALIVE/SeaLive1.1/OptimalLive/Info.plist'

在Xcode 9中运行代码正常,但在Xcode 10中有一个错误。


当前回答

这里也一样,但这是2020年5月的最新解决方案

它看起来像一个bug或一些新的Xcode版本的新问题。

错误响应为:

创建iOS项目失败。我们运行“xcodebuild”命令,但它退出了错误代码65。

详细的回应:

构建系统信息 错误:多个命令产生'/path/of/the/project/ios/build/NameOfTheProject/ build/ Products/ debug - iphoneonessimulator /NameOfTheProject.app/ zcial .ttf':

1)目标'NameOfTheProject'(项目'NameOfTheProject')有从'/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/ zcial .ttf'复制命令到'/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/ build/ Products/Debug-iphonesimulator/ namoftheproject .app/ zcial .ttf'

2)该命令取决于目标“项目名称”(项目“项目名称”)中的命令:脚本阶段“[CP]复制Pods资源”

构建系统信息 错误:多个命令产生'/path/of/the/project/ios/build/NameOfTheProject/ build/ Products/ debug - iphoneonesemulator /NameOfTheProject.app/SimpleLineIcons.ttf':

1)目标'NameOfTheProject'(项目'NameOfTheProject')有复制命令从'/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf'到'/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/ build/ Products/ debug -iphone emulator /NameOfTheProject.app/SimpleLineIcons.ttf'

2)该命令取决于目标“项目名称”(项目“项目名称”)中的命令:脚本阶段“[CP]复制Pods资源”

...

对于库使用的每个.ttf文件重复该响应。

我不得不临时取消react-native的链接,重新构建项目,但是没有图标。

其他回答

在开始之前,请注意我的项目使用Carthage作为依赖管理器。

这里没有一个现有的答案能解决我的问题。为我解决这个问题的方法如下。

First, I noticed that the build error pointed out one framework in particular. Next I filtered App Target > Build Phases for that framework. I noticed that that framework was present in both "Link Binary With Libraries" and "Embed Frameworks". Noting that none of the frameworks listed under "Embed Frameworks" were ones managed by Carthage I removed the framework in question from "Embed Frameworks". I then re-built my project and everything works fine including the functionality enabled by the framework in question.

检查您支持的平台!

我们花了几个月的时间来研究这个问题。我们发现AVAILABLE_PLATFORMS被设置为“appletvos appletvsimulator iphoneos iphoneonesemulator macosx watchos watchsimulator”,这将导致构建多个平台,这将导致“多个命令产生错误”。例如,“Foo”平台正在为iOS和TVOS构建,因此多个构建命令正在创建一个Foo.framework文件。

我们一出发就去

AVAILABLE_PLATFORMS = iphoneos iphonesimulator

在我们的根xcconfig文件中,这个问题在所有子项目中都消失了。

检查您的配置

Run

xcodebuild -project FitbitMobile.xcodeproj -target "FitbitMobile" -showBuildSettings > BuildSettings.txt

查看输出是否被设置为您所期望的值。如果你是一款iOS应用,并且你正在为tvOS开发,你将需要更新你的配置。

对于没有找到正确答案的同学因为这和info。plist没有关系。

我在开发一个macOS应用程序时遇到了这个问题,没有CocoaPods或Carthage,只有SPM包,手动将xcodeprojects拖到workplace。

当我只使用一个依赖时(它从内部使用Swift-NIO),一切都没问题,但当我添加一个又一个带有重叠子deps的依赖时,我遇到了这个讨厌的问题。

解决方案是尝试分别编译所有主要的依赖项(这将失败,因为在各自的.build文件夹中不存在签出文件夹,这很可能是因为您将pkg置于编辑模式(swift包编辑YourPkg…)

您只需取消编辑pkgs,并强制所有依赖项成功编译。之后,你必须确保你的主目标内的链接二进制文件没有重叠(我不确定这是否真的有必要,但以防万一)。

之后,一切都应该工作得很好:)

在我的例子中,我添加了GoogleService-Info。plist文件两次失望地到我的Firebase项目。

我先删除添加的GoogleService-Info。Plist,问题解决了。

如果你在核心数据中遇到问题,这个答案适合你。 转到你的文件名。xcdatamodeld并确保所有实体都有manual/None Codegen。