新建 iOS 項目時,一般會把 info.plist 文件從根目錄中移到 SupportingFiles 目錄中,這時編譯項目時會報錯
Multiple commands produce '/Users/david/Library/Developer/Xcode/DerivedData/xxxx-drkfpinemltwfnfqvyvovrozfaci/Build/Products/Debug-iphonesimulator/xxx.app/Info.plist':
1) Target 'xxxx' (project 'xxxx') has copy command from '/Users/david/david/myprojects/xxx/xxx/xxxx/SupportingFiles/Info.plist' to '/Users/david/Library/Developer/Xcode/DerivedData/xxxxx-drkfpinemltwfnfqvyvovrozfaci/Build/Products/Debug-iphonesimulator/xxxx.app/Info.plist'
2) Target 'xxxxx' (project 'xxxx') has process command with output '/Users/david/Library/Developer/Xcode/DerivedData/xxxx-drkfpinemltwfnfqvyvovrozfaci/Build/Products/Debug-iphonesimulator/xxxxx.app/Info.plist'
原因:
info.plist 的路徑變了,編譯器找不到了。
解決辦法:
項目名 -> Build Settings -> 搜索 info.plist,找到 Packaging 下的Info.plist File,把路徑改為正確的就行了,比如我的就是在原有路徑中添加上 SupportingFiles 就可以了。
如圖:

Have fun.