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


当前回答

在我的例子中,我从另一个项目导入了文件,并且在两个位置有相同的类。

我有以下相关的错误信息:

当我复制错误时,它原来复制了更多的文本信息,当我阅读转储时,我来到了相关行:

:0:错误:文件名“EventNode.swift”使用两次:

然后是位置,让我消除了问题。

在这个过程中,我发现了什么需要在“复制捆绑资源”:

Main.storyboard Assets.xcassets 任何SpriteKit场景(.sks)你的项目使用

其他回答

如果你在核心数据中遇到问题,这个答案适合你。 转到你的文件名。xcdatamodeld并确保所有实体都有manual/None Codegen。

有时出现这个问题的原因是你有多个目标,这些目标有不同的iOS部署目标。检查你的目标(例如你的主应用目标和你的扩展)是否有相同的iOS部署目标。

如果您手动创建实体的CoreDataClass和CoreDataProperties,请确保转到您的xcdatamodel并将检查器选项卡中的Codegen设置为“Manual/None”。如果设置为“类定义”,Xcode会自动为你创建一个重复的类。

这是我的错误信息:

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之前(归功于这个答案)。

问题: 在命令行中为Cocoapod项目创建xcodebuild存档时遇到错误。

控制台错误: 错误:多个命令产生'/Users/xxxx/Library/Developer/Xcode/DerivedData/…':

解决这个问题的步骤:

打开Xcode 在Xcode编辑器的顶部选择Scheme 选择编辑方案 在弹出窗口的左列中选择Build。 如果添加了与已编辑方案相关的目标以外的任何其他目标。 选择不相关的目标,并通过按“减号图标”删除它,并关闭弹出窗口。 在命令行中再次运行xcodebuild命令以解决问题。

图片说明:

步骤1:

步骤3:

步骤4 - 6: