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

其他回答

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

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

在我的情况下,我有关于信息的错误。Plist复制输出文件:

warning: duplicate output file


/Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate/Info.plist'. (in target 'boilerplate' from project 'boilerplate')
warning: duplicate output file '/Users/mahdifaraji/Library/Developer/Xcode/DerivedData/boilerplate-fpkyeiljiiuxbidceadasmpsntah/Build/Products/Debug-iphonesimulator/boilerplate.app/Info.plist' on task: ProcessInfoPlistFile /Users/mahdifaraji/Library/Developer/Xcode/DerivedData/boilerplate-fpkyeiljiiuxbidceadasmpsntah/Build/Products/Debug-iphonesimulator/boilerplate.app/Info.plist /Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate/Info.plist (in target 'boilerplate' from project 'boilerplate')

** BUILD FAILED **

我解决了这个问题,从项目->目标->建筑阶段->复制捆绑资源

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

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

尝试所有这些选项,这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 :-)

搜索并删除由多个命令产生的重复文件。

这里,一个额外的信息。应该删除plist文件(在我的情况下,它是Contents.json)

error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist'