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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容