Xcode10 Error:Multiple commands produce
最近在使用Xcode10 版本的,今天升级到Xcode10 beta3,但是在编译项目时编译失败,报错内容:
error: Multiple commands produce '/Users/xiaoyuan/Library/Developer/Xcode/DerivedData/xxx-gnxeuntgkenwgdgycqnvabqubafh/Build/Products/Debug-iphoneos/xx.app':
1) Target 'xxx' has create directory command with output '/Users/xiaoyuan/Library/Developer/Xcode/DerivedData/xxxx-gnxeuntgkenwgdgycqnvabqubafh/Build/Products/Debug-iphoneos/xxxx.app'
2) That command depends on command in Target 'xxxx': script phase “[CP] Copy Pods Resources”
1.修改build system --- 最快速有效的解决方法
在Xcode菜单栏 -> File -> Workspace Setting,将build system修改为legacy build system,然后clean后编译。
2.不修改build system
分析build error 日志,错误发生在Copy Pods Resources
,而且与output
有关,应该是使用了cocoapods导致的,尝试删除该项目target-Copy Pods Resources-Output Files
,成功解决问题。
选中项目target -> Build phase -> Copy Pods Resources -> Output Files -> 移除${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} -> Build
示例图