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


当前回答

在我的情况下,我有一个修改手表项目的应用程序和扩展都有一个信息。plist文件(都以相同的名字命名),为了解决这个问题,我重新命名了ios应用程序的文件,我把它作为信息。我将手表命名为watch_info。等等 之后,我在包装信息下修改了“项目->目标->构建设置”。Pilst并相应地修改了plist文件名,这为我解决了它

注意,我在其他地方看到在项目/工作区设置下将构建系统从新的更改为遗留的,尽管它有效-我不建议这样做,因为它会导致其他问题。

其他回答

这里是另一个工作解决方案:(如果你使用自定义Pods)

在截图中选择侧边栏中的“Pods”作为亮点。 单击Build Phase。展开“头”部分。有3个选项,公共,私人,项目 展开Public,检查是否有重复的文件。删除它。完成了! !

如果你是通过Ditto命令创建同名的多个实例(而不是“复制文件”构建阶段)得到这个,你可能必须改变产品模块名称。

点击Xcode抱怨的目标 点击构建设置 搜索“产品模块名称” 将名称更改为唯一的名称

在我们的应用中,我们有一个观察目标和一些通知目标,所以我把Extension之类的东西放在模块名的末尾。

我最初在这里找到了这个解决方案:https://forums.developer.apple.com/thread/103913

在开始之前,请注意我的项目使用Carthage作为依赖管理器。

这里没有一个现有的答案能解决我的问题。为我解决这个问题的方法如下。

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.

在我的情况下,我有关于信息的错误。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 **

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

我也有同样的问题,但能够通过删除相关的.png和图标资产目录来修复它,然后构建应用程序。这产生了预期的错误,因为资产丢失了。之后,我又添加了一切,并建立应用程序没有任何问题。