Xcode 10 Error: Multiple commands produce

2019-01-03 20:04发布

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'

running the code in Xcode9 works, but results in an error in Xcode10.

30条回答
Fickle 薄情
2楼-- · 2019-01-03 20:28

Select your scheme (top left corner) -> Edit Scheme... -> Build (left tab) -> uncheck "Find Implicit Dependencies"

enter image description here

And after that you may need to fix any dependencies that were not imported explicitly by your targets.

查看更多
一夜七次
3楼-- · 2019-01-03 20:31

Search & Remove duplicate files those are produced from multiple commands.

Here, an extra Info.plist file should be removed (In my case it was Contents.json)

error: Multiple commands produce '/Users/uesr/Library/Developer/Xcode/DerivedData/OptimalLive-fxatvygbofczeyhjsawtebkimvwx/Build/Products/Debug-iphoneos/OptimalLive.app/Info.plist'
查看更多
Rolldiameter
4楼-- · 2019-01-03 20:32

Before I begin note that my project utilizes Carthage as a dependency manager.

None of the existing answers here resolved my issue. What did resolve the issue for me was the following.

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.

查看更多
一夜七次
5楼-- · 2019-01-03 20:33

If you use CocoaPods you may want to try deintegrate the pods and install again. It works for me.

pod deintegrate

pod install

查看更多
祖国的老花朵
6楼-- · 2019-01-03 20:34

I had bunch of Multiple commands produce warnings - not limited to info.plist duplication in one target. Including localized resources and string files, headers etc.

Solution: remove all duplications in target membership.

查看更多
地球回转人心会变
7楼-- · 2019-01-03 20:34

Steps:

  1. Go to Xcode File
  2. Click to WorkSpace Settings
  3. Build System Select as Legacy Build System
查看更多
登录 后发表回答