使用XCode10编译老项目时报错;
Xcode10使用了一个的新创建系统,比之前的提供更好的可靠性与创建性能,而且可以获取项目配置问题(默认设置新创建系统);在苹果文档中,提及Xcode10中的关于旧项目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.
New Build System会对构建中的元素循环进行严格的检查,避免不必要的重建,这个也是错误出现的原因。
错误发生的两种普遍形式:
1、info.plist
Multiple commands produce '/Users/tjsoft/Library/Developer/Xcode/DerivedData/TYKYTwoLearnOneDo-amcfzswumxdotlgjwdslugmywxch/Build/Products/Debug-iphoneos/TYKYTwoLearnOneDo.app/Info.plist':
1) Target 'TYKYTwoLearnOneDo' (project 'TYKYTwoLearnOneDo') has copy command from '/Users/tjsoft/TYKY /党建/黔纪/Qian

在升级到Xcode10后,遇到编译错误提示'Multiple commands produce',主要涉及info.plist和Copy Pods Resources。解决方法包括将构建系统切换回Legacy模式,或者删除Build Phases中多余的信息。具体操作包括在target的Copy Bundle Resources中移除重复的info.plist,以及在Copy Pods Resources的Output Files中移除冲突的资源。
最低0.47元/天 解锁文章
4777

被折叠的 条评论
为什么被折叠?



