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


当前回答

在我的例子中,问题来自podcast文件。我必须将我的测试项目添加到podfile:

target 'MyApp' do
    pod 'Firebase'
    target 'MyAppTests' do
        inherit! :search_paths
        pod 'Firebase'
    end
end

之后,我需要执行:

pod update

其他回答

在开始之前,请注意我的项目使用Carthage作为依赖管理器。

这里没有一个现有的答案能解决我的问题。为我解决这个问题的方法如下。

First, I noticed that the build error pointed out one framework in particular. Next I filtered App Target > Build Phases for that framework. I noticed that that framework was present in both "Link Binary With Libraries" and "Embed Frameworks". Noting that none of the frameworks listed under "Embed Frameworks" were ones managed by Carthage I removed the framework in question from "Embed Frameworks". I then re-built my project and everything works fine including the functionality enabled by the framework in question.

我的问题是我创建的动作扩展和主要目标的产品模块名称重复。解决方案是更改扩展的产品模块名称(在Build Settings下)。

(11) XCode

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

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

转到Xcode 10,错误像

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

可解如下:

进入Xcode->File->Workspace/Project Settings-> Build System -> Legacy Build System。