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


当前回答

如果你开发了私有cocoapod,并且已经通过Podfile添加了它,

从嵌入式二进制文件部分删除它:

其他回答

在我的例子中,构建存档错误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

试试这个方法:

在Xcode中,进入File->项目/工作区设置。

将构建系统更改为遗留构建系统。

所以我遇到的问题是我不小心包含了信息。在项目设置->构建阶段->复制捆绑资源为我的目标。

这个答案已弃用——XCode 12已经弃用了遗留构建系统,它将在进一步的版本中被移除

试试这个吧。 Xcode->File->Project Settings-> Build System -> Legacy Build System。

这里提出的解决方案没有一个对我有效。这主要归功于CocoaPods。我以前使用Cocoapods 1.3.1。简单地升级到1.5.3并不能立即解决这个问题。

我遵循的步骤是:

删除Podfile.lock 删除Pods目录 删除派生数据并清除 退出Xcode 将CocoaPods更新到1.5.3 运行pod安装 打开工作区和构建