重新运行cocoapods后程序,程序运行报一下错误
Multiple commands produce '/Users/shilei/Library/Developer/Xcode/DerivedData/TraditionalChineseMedicine-hdfvehcpsglccpgnhtqakznsmuro/Build/Products/Debug-iphoneos/TraditionalChineseMedicine.app/Assets.car':
1) Target 'TraditionalChineseMedicine' (project 'TraditionalChineseMedicine') has compile command with input '/Users/shilei/Desktop/DeviOS/TraditionalChineseMedicine/Supporting Files/Images.xcassets'
2) That command depends on command in Target 'TraditionalChineseMedicine' (project 'TraditionalChineseMedicine'): script phase “[CP] Copy Pods Resources”
因是Xcode 10 默认使用的build system是New build system,与Xcode9不同导致。
第一种方法 不修改build system
分析build error 日志,错误发生在Copy Pods Resources,而且与output有关,应该是使用了cocoapods导致的,尝试删除该项目target-Copy Pods Resources-Output Files,成功解决问题。
第二种方法 修改build system
在Xcode菜单栏 -> File -> Workspace Setting,将build system修改为legacy build system,然后clean后编译。