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中有一个错误。


当前回答

2022的答案

如果您有多个目标,请确保部署目标相同。

其他回答

嗯,就我而言:

如果创建了两个同名的文件,将触发此错误。 删除您最近添加的一个,将解决这个问题。

希望这能有所帮助。

在我的例子中,我有我的GoogleService-info。Plist文件多次复制,因为它包括在我的主要应用程序和共享扩展项目。

解决方案是将该文件从扩展项目中排除(通过在其file Inspector侧窗口视图中的Target中取消选中该文件);因为我不喜欢切换到遗留构建系统的选项(这也适用于我)。

所以我遇到的问题是我不小心包含了信息。在项目设置->构建阶段->复制捆绑资源为我的目标。

在开始之前,请注意我的项目使用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.

如果你使用CocoaPods,你可能想要尝试分解pod并重新安装。这对我很管用。

赛事deintegrate

正在安装