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


当前回答

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

其他回答

这个问题可能是因为App中有多个Plist文件或其他文件

解决方案->打开目标->构建阶段>复制Bundle资源并删除信息。请从那里开始。

注意:如果你已经开发了一个手表应用程序,那么你将不得不从手表和手表扩展删除plist。

解决方案一: 打开目标➼构建阶段➼复制Bundle资源➼删除信息。请从那里开始。➼你必须从扩展中删除plist(如果有的话)。

解决方案2: 如果你使用CocoaPods,你可能想要尝试分解pod并重新安装。 命令:

1) pod deintegrate
2) pod install

解决方案3: 在Xcode中,进入文件➼项目/工作区设置。 ➼将构建系统更改为遗留构建系统。

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

在Xcode 10中,它也适用于以前的版本

双击项目 你会看到下图 从左边选择目标 扩展拷贝包资源(0项) 删除产生错误的相应文件

如果你的应用程序生成了与多个.app文件相关的错误,那么从“复制bundle资源”中删除。plist文件将不起作用。

如果该错误与.app文件有关,请执行以下步骤

Select the Target. Go to Build Phases tab. Remove the items listed in Output Files Compile the code if it compiles successfully then not follow the next steps. If code does not compile successfully and Xcode may give you an error related to "Library not found". Then add the missing library in General Tab in Linked Frameworks and Libraries that Xcode mentioned in the error. Keep adding these libraries (that Xcode ask through compile errors) in Linked Frameworks and Libraries until the code compiles successfully. Hope this helps.