Xcode运行旧项目报错Multiple commands produce'XXX'/info.plist

具体报错如下:

  1. Target 'XX' (project 'XX') has copy command from '/XX/Info.plist' to 'XX/Info.plist'
  2. Target 'XX (project 'XX') has process command with output '/XX/Info.plist'

解决办法一:
target——buildphases——Copy Bundle Resources,删除plist.info

其他:
Multiple commands produce 'XX/Contents.json':
方法同上,删除对应的Contents.json

方法二:
File -> Project/Workspace settings.
-> Build System 选择 Legacy Build System

图片.png

图片.png
图片.png

至于会出现以上错误的原因,Xcode10使用了一个的新创建系统,比之前的提供更好的可靠性与创建性能,而且可以获取项目配置问题(默认设置新创建系统)

在苹果文档中,提到Xcode10中的关于旧项目New Build System更改适配,而New Build System会对构建中的元素循环进行严格的检查,避免不必要的重建,这个也是错误出现的原因。

文档内容如下:

The new build system has stricter checks for cycles between elements in the build in order to prevent unnecessary rebuilds.
It is an error for any individual file in the build to be produced by more than one build command. For example, if two targets each declare the same output file from a shell script phase, factor out the declaration of the output file into a single target.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容