最近在使用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
示例图
本文针对Xcode10beta3版本编译失败的问题,提供了两种解决方法:一是修改buildsystem为legacybuildsystem;二是不修改buildsystem,通过删除特定outputfiles来解决问题。适用于使用Xcode和cocoapods的开发者。


4836

被折叠的 条评论
为什么被折叠?



