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


当前回答

这是我的错误信息:

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

其他回答

对于那些使用React Native和Cocoapods的用户

这个问题是由一些libRN出版的…一个文件。我通过删除其中一些像libRNScreens来修复它。a和libRNGestureHandler。链接二进制文件与库,因为它们已经被其他库引用。其他的则必须被他们的Pod版本如librndeviceinfo所取代。

我有一堆多个命令产生警告-不限于信息。在一个目标中复制。包括本地化资源和字符串文件,头文件等。

解决方案:删除目标成员中的所有重复项。

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

我使用迦太基和Xcode 10。

我的解决方案是->项目->目标->一般->

从“嵌入式二进制文件”中删除添加了Carthage的框架

通常你必须在构建阶段添加一个脚本来剥离应用商店的架构。

在Xcode 10中,脚本似乎被称为always。所以它复制框架到正确的位置,你不需要将它们添加到常规选项卡。

注意:如果没有设置->在构建设置->搜索路径->框架搜索路径->设置路径为你添加的框架Carthage ....如。“$ (PROJECT_DIR) /迦太基/构建/ iOS”

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

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

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

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