Multiple commands produce '/xxx/Developer/Xcode/DerivedData/Build/xxx/xxx.app/Info.plist'

新建 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.

你可能感兴趣的:(Multiple commands produce '/xxx/Developer/Xcode/DerivedData/Build/xxx/xxx.app/Info.plist')