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

其他回答

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

这里也一样,但这是2020年5月的最新解决方案

它看起来像一个bug或一些新的Xcode版本的新问题。

错误响应为:

创建iOS项目失败。我们运行“xcodebuild”命令,但它退出了错误代码65。

详细的回应:

构建系统信息 错误:多个命令产生'/path/of/the/project/ios/build/NameOfTheProject/ build/ Products/ debug - iphoneonessimulator /NameOfTheProject.app/ zcial .ttf':

1)目标'NameOfTheProject'(项目'NameOfTheProject')有从'/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/ zcial .ttf'复制命令到'/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/ build/ Products/Debug-iphonesimulator/ namoftheproject .app/ zcial .ttf'

2)该命令取决于目标“项目名称”(项目“项目名称”)中的命令:脚本阶段“[CP]复制Pods资源”

构建系统信息 错误:多个命令产生'/path/of/the/project/ios/build/NameOfTheProject/ build/ Products/ debug - iphoneonesemulator /NameOfTheProject.app/SimpleLineIcons.ttf':

1)目标'NameOfTheProject'(项目'NameOfTheProject')有复制命令从'/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf'到'/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/ build/ Products/ debug -iphone emulator /NameOfTheProject.app/SimpleLineIcons.ttf'

2)该命令取决于目标“项目名称”(项目“项目名称”)中的命令:脚本阶段“[CP]复制Pods资源”

...

对于库使用的每个.ttf文件重复该响应。

我不得不临时取消react-native的链接,重新构建项目,但是没有图标。

如果您手动创建实体的CoreDataClass和CoreDataProperties,请确保转到您的xcdatamodel并将检查器选项卡中的Codegen设置为“Manual/None”。如果设置为“类定义”,Xcode会自动为你创建一个重复的类。

error: Multiple commands produce '/Users/KunshtechNew/Library/Developer/Xcode/DerivedData/chat21-fgjaqebxysmggqfdnetggdbzfqih/Build/Products/Debug-iphonesimulator/Chat21.app/Base.lproj/Chat.strings':
1) Target 'chat21' (project 'chat21') has copy command from '/Users/KunshtechNew/Downloads/chat21-ios-demo-master/TildeskWidget/Chat21Core/Base.lproj/Chat.strings' to '/Users/KunshtechNew/Library/Developer/Xcode/DerivedData/chat21-fgjaqebxysmggqfdnetggdbzfqih/Build/Products/Debug-iphonesimulator/Chat21.app/Base.lproj/Chat.strings'
2) Target 'chat21' (project 'chat21') has copy command from '/Users/KunshtechNew/Downloads/chat21-ios-sdk-master 2/Chat21Core/Base.lproj/Chat.strings' to '/Users/KunshtechNew/Library/Developer/Xcode/DerivedData/chat21-fgjaqebxysmggqfdnetggdbzfqih/Build/Products/Debug-iphonesimulator/Chat21.app/Base.lproj/Chat.strings'

有两种不同的解决方案可以摆脱这个问题:

解决方案1

正如我们所看到的,我得到了同样的错误..在我的情况下,在TildeskWidget文件夹中有一个额外的Chat21Core文件夹副本。这是在制造问题。 因此,一个可能的解决方案也可以完全读取错误,并尝试查找是否有任何额外的副本引用项目或没有。

解决方案2

当我面对不同项目的相同类型的问题时,我发现了另一个简单的解决方案。这次我得用不同的方法。

豆荚从项目中分解。 删除工作区文件和pod。锁定文件从项目文件夹。 同样是pod安装 试着建立项目。

希望这对你有用。

评论use_frameworks !PodFile对我很有用。

#use_frameworks!

注意:这是在XCode 10.1, pod version 1.8.4上做的