新建 iOS 項(xiàng)目時(shí)溶推,一般會(huì)把 info.plist 文件從根目錄中移到 SupportingFiles 目錄中熙卡,這時(shí)編譯項(xiàng)目時(shí)會(huì)報(bào)錯(cuò)
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 的路徑變了救崔,編譯器找不到了琉挖。
解決辦法:
項(xiàng)目名 -> Build Settings -> 搜索 info.plist凌受,找到 Packaging 下的Info.plist File
店雅,把路徑改為正確的就行了政基,比如我的就是在原有路徑中添加上 SupportingFiles 就可以了。
如圖:
Have fun.