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


当前回答

尝试所有这些选项,这3个选项中的任何一个都会为你工作,肯定的

Option 1: Remove all files from

目标>>构建阶段>>编译源代码 目标>>构建阶段>>拷贝Bundle资源

Option 2: Change the build system

Xcode->File->Project Settings-> Build System -> Legacy Build System

Option 3: remove and update existing pod

pod缓存清理PromisesObjC pod缓存清理承诺 cd [your_project_dir] rm -rf Pods/ rm Podfile.lock 豆荚更新

I hope this will help you, Happy coding :-)

其他回答

我有同一文件的多份副本。简单地说,保留一个副本,删除所有剩余的。清理构建,并对问题进行排序。

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

在我的例子中,清理被剥夺的数据和构建设置(按此顺序),重新启动Xcode和模拟器有帮助。

我试图做解决方案->开放目标->构建阶段>复制捆绑资源,但它再次出现在那里。清理被剥夺的数据有帮助。在错误中,它显示了副本的位置,在我的情况下,它说它在我的应用程序包和被剥夺的数据中。

这个答案已弃用——XCode 12已经弃用了遗留构建系统,它将在进一步的版本中被移除

试试这个吧。 Xcode->File->Project Settings-> Build System -> Legacy Build System。