天天看點

XCode 10 錯誤:Multiple commands produce

更新到XCode 10後編譯項目出現以下錯誤:

:-1: Multiple commands produce '':

1) Target 'xxxx' has create directory command with output ''

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

百度得到結果:

錯誤發生在[CP] Copy Pods Resources,且與output有關。

解決方案:根據提示資訊,選中對應的target -> Build Phases -> [CP] Copy Pods Resources -> Output Files -> 移除${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH} -> build

來源:連結

更改後繼續錯誤:

:-1: Multiple commands produce '':

1) Target 'BBBB' (project 'Pods') has copy command from '.../BBBB/internal.h'

:-1: Multiple commands produce XXX':

1) Target 'DDDD' (project 'Pods') has copy command from '..../DDDD/UIScrollView+UNOUtilily.h'

最後發現XCode 10加入了一個Workspace Settings(也可能以前有我不知道)

File --> Workspace Settings,将Build System改為:Legacy Build System 可解以上所有問題。

XCode 10 錯誤:Multiple commands produce