简体   繁体   English

Xcode 10多个命令为Pods依赖构建错误

[英]Xcode 10 multiple commands build error for Pods dependency

Multiple commands produce '/Users/abc/Library/Developer/Xcode/DerivedData/MyProject-cworwzaxajsmfkcfvourofovbggd/Build/Products/QA-iphonesimulator/MyProject.app':

1) Target 'MyProject' has create directory command with output '/Users/abc/Library/Developer/Xcode/DerivedData/MyProject-cworwzaxajsmfkcfvourofovbggd/Build/Products/QA-iphonesimulator/MyProject.app'

2) That command depends on command in Target 'MyProject': script phase “[CP] Copy Pods Resources”

It seems like a script in Copy pods resources is conflicting with the normal build command. 似乎Copy pods resources的脚本与正常的构建命令冲突。 I have tried all the available solutions 我已经尝试了所有可用的解决方案

  1. Removing redundant files from copy bundle resources . copy bundle resources删除冗余文件。
  2. Updating cocoapods. 更新cocoapods。
  3. Changing product module name under Build settings to a unique one. Build settings下的product module名称更改为唯一的名称。
  4. Removed info.Plist from Copy Bundle Resources Copy Bundle Resources删除了info.Plist

Temporary Fix : Xcode > File > Workspace Settings > Build System > Choose "Legacy Build System" 临时修复 :Xcode>文件>工作区设置>构建系统>选择“旧版构建系统”

Attaching my Copy Pods Resources screenshot 附加我的Copy Pods Resources截图 在此输入图像描述

Please try sudo gem update cocoapods and update your cocoapods version. 请尝试sudo gem update cocoapods并更新您的cocoapods版本。 that solved in my case. 这解决了我的情况。

@birdcage - Update CocoaPods> Terminal @birdcage - 更新CocoaPods>终端

sudo gem update cocoapods

Then Delete Pods folder, .xcworkspace then delete Podfile.lock 然后删除Pods文件夹, .xcworkspace然后删除Podfile.lock

then reinstall all library. 然后重新安装所有库。

pod install

Changing build systems to Legacy Build System works for me. 将构建系统更改为Legacy Build System对我有用。

Xcode => File => Workspace Settings => Build System => Change to "Legacy Build System" Xcode => File => Workspace Settings => Build System =>更改为"Legacy Build System"

只需从项目目标中删除[CP] Copy Pods Resources。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM