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


当前回答

如果你是通过Ditto命令创建同名的多个实例(而不是“复制文件”构建阶段)得到这个,你可能必须改变产品模块名称。

点击Xcode抱怨的目标 点击构建设置 搜索“产品模块名称” 将名称更改为唯一的名称

在我们的应用中,我们有一个观察目标和一些通知目标,所以我把Extension之类的东西放在模块名的末尾。

我最初在这里找到了这个解决方案:https://forums.developer.apple.com/thread/103913

其他回答

我有同样的问题,但与头文件。

在这种情况下,解决方案是将标题从“公共”部分移动到“项目”部分。

不要启用遗留构建,你只是在隐藏问题

我有两个GoogleService-Info。请输入我的项目。必须删除旧的,并从构建阶段>>复制捆绑资源中删除它的条目

这是我的错误信息:

error: Multiple commands produce '/Users/runner/Library/Developer/Xcode/DerivedData/slapshot-ios-bpixgzdbgfcmofhguehgrznwbjxl/Build/Intermediates.noindex/ArchiveIntermediates/slapshot-ios-example/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Introspect.framework'
    note: Target 'Introspect-dynamic' (project 'Pods') has create directory command with output '/Users/runner/Library/Developer/Xcode/DerivedData/slapshot-ios-bpixgzdbgfcmofhguehgrznwbjxl/Build/Intermediates.noindex/ArchiveIntermediates/slapshot-ios-example/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Introspect.framework'
    note: Target 'Introspect-static' (project 'Pods') has create directory command with output '/Users/runner/Library/Developer/Xcode/DerivedData/slapshot-ios-bpixgzdbgfcmofhguehgrznwbjxl/Build/Intermediates.noindex/ArchiveIntermediates/slapshot-ios-example/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Introspect.framework'

我必须添加:linkage =>:static到我的所有目标,而不仅仅是其中的一些,在运行pod deintegrate/pod install之前(归功于这个答案)。

我的ProjectName。Xcodeproj有一个对同名文件的有效引用和一个无效引用。项目导航器中相同的文件名,一个文件名是红色的,另一个是正常的。我摆脱了无效的引用一个(红色的),问题解决了。

在xcode中删除“Copy Bundle Resources”字体后,错误消失