错误发生的两种普遍形式:
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 /党建/黔纪/QianJiDangJian_iOS/TYKYTwoLearnOneDo/Info.plist' to '/Users/tjsoft/Library/Developer/Xcode/DerivedData/TYKYTwoLearnOneDo-amcfzswumxdotlgjwdslugmywxch/Build/Products/Debug-iphoneos/TYKYTwoLearnOneDo.app/Info.plist'
2) Target 'TYKYTwoLearnOneDo' (project 'TYKYTwoLearnOneDo') has process command with output '/Users/tjsoft/Library/Developer/Xcode/DerivedData/TYKYTwoLearnOneDo-amcfzswumxdotlgjwdslugmywxch/Build/Products/Debug-iphoneos/TYKYTwoLearnOneDo.app/Info.plist'
2、Copy Pods Resources
错误信息
Multiple commands produce '/Users/satoshi_uma/Library/Developer/Xcode/DerivedData/Hospital-bztfekjhqhihnxaarhkecyjfvdyc/Build/Products/Debug-iphoneos/***.app/NIMKitEmoticon.bundle':
1) Target 'Hospital' (project 'Hospital') has copy command from '/Users/satoshi_uma/Desktop/华为版本/ys-app-develop/ios/Hospital/Resource/NIMKitEmoticon.bundle' to '/Users/satoshi_uma/Library/Developer/Xcode/DerivedData/Hospital-bztfekjhqhihnxaarhkecyjfvdyc/Build/Products/Debug-iphoneos/***.app/NIMKitEmoticon.bundle'
2) That command depends on command in Target 'Hospital' (project 'Hospital'): script phase “[CP] Copy Pods Resources”
解决方法可以有两种,一种是不使用New Build System,在File > Project/Workspace Settings中的Share Project/Workspace Settings 里build system 将New Build System(Default)切换成Legacy build system。

其次是根据出错信息,在新创建系统模式下,去除多余的引用重建。
Info.plist
在 target -> Build phase > Copy Bundle Resource 中找到info.plist,移除

Copy Pods Resources
在 target -> Build phase > Copy Pods Resources -> Output Files,移除${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}

网友评论