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


当前回答

进入Xcode -> File ->Workspace Settings。 你会发现一个突然出现的。

从Build System标签中选择“Legacy Build System”。 按“完成”

注意:-确保用“cmd+shift+alt+k”和“Derived Data”清除你的项目

建立你的项目,它将工作的魅力:)

其他回答

我在XCode 14.2中也面临同样的问题

错误说

多个命令生成“/Users/bhaveshparmar/Library/Developer/Xcode/DerivedData/App-cgedsyimmqlucmcodsrdnwzllkat/Build/Intermediates.noindex/App.build/development-iphone emulator /App.build/Objects-normal/x86_64/ThemeLabel.stringsdata”

这是因为我的源代码包含2个同名ThemeLabel的文件,所以删除了一个ThemeLabel,问题解决了。

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

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

在检查构建日志时,我注意到一个警告:

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/<redacted>/Repositories/Whitesmith/optimize-ios/Carthage/Checkouts/WSStatusBarNotification/Miscellaneous/Info.plist'. (in target 'JDStatusBarNotification')

如果这是你的情况,那就去你的目标:

构建阶段 拷贝包资源 删除info.plist。

在Xcode 10中,它也适用于以前的版本

双击项目 你会看到下图 从左边选择目标 扩展拷贝包资源(0项) 删除产生错误的相应文件

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

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