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


当前回答

在我的案例中,PDFGenerator正在生成一个信息。plist文件,我刚刚删除了它。

其他回答

在向应用程序添加了Fabric sdk套件的第二部分后,我遇到了这个问题。

实际发生的是GoogleUtilies框架被添加到Pods项目两次

这在Xcode 10之前是没问题的,但是如果一个文件有两个操作(在这种情况下是一个复制操作),Xcode 10就会报错。

去掉第二个框架是安全的。

这基本上意味着你有多个名为Info.plist的文件; 通常情况下没问题,但你的文件被设置为相同的目标会员。因此,修复方法是:单击每个文件并在右侧检查它们的目标成员,确保它们不重叠。

在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.

对于cocoapods管理的依赖项目,通过提供本地podspec来排除信息来解决问题。请参考资料。以godzippa为例

Podfile pod 'Godzippa',:podspec =>“venders/ Godzippa .podspec”

厂商/ godzippa.podspec s.source_files = 'Sources/*.{h,m}'