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文件,我刚刚删除了它。

其他回答

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

在我的例子中,构建存档错误vs Xcode10

-1: Multiple commands produce '/Users/kk/Library/Developer/Xcode/DerivedData/react_carday_app-hjahojxsbvmmiyaklrhhuqljdfwv/Build/Intermediates.noindex/ArchiveIntermediates/react_carday_app/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a': 1) Target 'yoga' has a command with output '/Users/kk/Library/Developer/Xcode/DerivedData/react_carday_app-hjahojxsbvmmiyaklrhhuqljdfwv/Build/Intermediates.noindex/ArchiveIntermediates/react_carday_app/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a' 2) Target 'yoga' has a command with output '/Users/kk/Library/Developer/Xcode/DerivedData/react_carday_app-hjahojxsbvmmiyaklrhhuqljdfwv/Build/Intermediates.noindex/ArchiveIntermediates/react_carday_app/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libyoga.a'

在你的Podfile中应该有类似bellow的东西

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end

    if target.name == "yoga"
      target.remove_from_project
    end
  end
end

然后运行pod install

嗯,就我而言:

如果创建了两个同名的文件,将触发此错误。 删除您最近添加的一个,将解决这个问题。

希望这能有所帮助。

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

如果你的应用程序生成了与多个.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.