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


当前回答

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

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。

其他回答

对我来说,它只是拥有两个同名的文件。

在我的情况下,我有关于信息的错误。Plist复制输出文件:

warning: duplicate output file


/Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate.xcodeproj: warning: The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate/Info.plist'. (in target 'boilerplate' from project 'boilerplate')
warning: duplicate output file '/Users/mahdifaraji/Library/Developer/Xcode/DerivedData/boilerplate-fpkyeiljiiuxbidceadasmpsntah/Build/Products/Debug-iphonesimulator/boilerplate.app/Info.plist' on task: ProcessInfoPlistFile /Users/mahdifaraji/Library/Developer/Xcode/DerivedData/boilerplate-fpkyeiljiiuxbidceadasmpsntah/Build/Products/Debug-iphonesimulator/boilerplate.app/Info.plist /Users/mahdifaraji/Desktop/boilerplate/ios/boilerplate/Info.plist (in target 'boilerplate' from project 'boilerplate')

** BUILD FAILED **

我解决了这个问题,从项目->目标->建筑阶段->复制捆绑资源

在我的例子中,我添加了GoogleService-Info。plist文件两次失望地到我的Firebase项目。

我先删除添加的GoogleService-Info。Plist,问题解决了。

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安装 试着建立项目。

希望这对你有用。

没有遗留构建系统 如果你有这样的Podfile

def shared_pods
  pod 'X'
end

target 'A' do
  shared_pods
end

target 'B' do
  shared_pods
end

B也依赖于A然后像这样把B移到A

 target 'A' do

   shared_pods

   target 'B' do
     inherit! :search_paths
   end
 end