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中有一个错误。
我是IOS开发的新手,我尝试了上面的答案,但它们对我不起作用。
我的XCode版本是12.4,Swift 5
我得到多个命令产生错误,而构建
我试图从错误列表中扩展错误,但双击它没有做什么,所以首先,我很难知道完整的错误。
所以我右键单击错误并复制到剪贴板,粘贴在文本编辑器中。
它显示了完整的错误
上面说哪部分有问题
Multiple commands produce '/Users/userName/Library/Developer/Xcode/DerivedData/ProjectName-fbeqffupediuiedlrplqjyhgyqna/Build/Products/Production-iphoneos/XCFrameworkIntermediates/GoogleAppMeasurement':
1) That command depends on command in Target 'GoogleAppMeasurement-iOS12.3' (project 'Pods'): script phase “[CP] Copy XCFrameworks”
2) That command depends on command in Target 'GoogleAppMeasurement-iOS14.1' (project 'Pods'): script phase “[CP] Copy XCFrameworks”
(我正在使用谷歌Firebase)
我很惊讶地看到,这些pod是为两个不同版本的iOS(12.3和14.1)编译的。
我发现,在活动目标配置中,我在部署信息部分设置了iOS 12.3,在项目级别信息选项卡的部署目标中设置了14.1
将两者设置为相同的所需版本,然后清理和构建解决了这个问题。
请让我知道设置2个不同的版本是否是一个错误。如果这不是一个错误,那么应该怎么做呢?
不允许我将构建系统设置为遗留系统
信息。plist在Copy Bundle Resources阶段不存在
在我的例子中,构建存档错误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