Xcode 10 Error: Multiple command

2018-09-19  本文已影响602人  守候的流年

1️⃣
今天Xcode升级到 10 版本的,在 Swift项目中没有报错,但是在另一个 OC 和 Swift 混编的项目中,在编译项目时编译失败,报错内容:

Showing Recent Messages
:-1: Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/appName-bqmglfwcbrgfevbwcndeqktficvk/Build/Products/Debug-iphoneos/appName.app/Info.plist':
1) Target 'appName' (project 'appName') has copy command from '/Users/user/Desktop/AppFile/appName/Info.plist' to '/Users/user/Library/Developer/Xcode/DerivedData/appName-bqmglfwcbrgfevbwcndeqktficvk/Build/Products/Debug-iphoneos/appName.app/Info.plist'
2) Target 'appName' (project 'appName') has process command with output '/Users/user/Library/Developer/Xcode/DerivedData/appName-bqmglfwcbrgfevbwcndeqktficvk/Build/Products/Debug-iphoneos/appName.app/Info.plist'

报错截图@2x.png

分析报错内容,错误发生在 Multiple commands produce, 直接解释就是发生的文件重复, 但是在实际中没有发现info.plist文件有冲突,

我找到了这个构建错误的解决方案,对于任何与Xcode 10构建系统有相同问题的人,按照以下步骤修复它原文地址:

1. In Xcode, go to File->Project/Workspace settings.
2. Change the build system to Legacy Build system.
image.png

参考

2️⃣

升级 xcode10 之后 OC 项目运行报错这个,(在 Xcode9.4.1中没有问题)

ld: warning: directory not found for option '-L/Users/user/Desktop/AppFile/AppName/SDK/PaySDK/UPApplePay'
ld: warning: directory not found for option '-L/Users/user/Desktop/AppFile/AppName/SDK/PaySDK/UPPayPlugin'
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_CNContactStore", referenced from:
      objc-class-ref in iflyMSC(IFlyContact.o)
  "_OBJC_CLASS_$_CNContactFetchRequest", referenced from:
      objc-class-ref in iflyMSC(IFlyContact.o)
  "_CNContactFamilyNameKey", referenced from:
      -[IFlyContact fetchContactWithContactStore:] in iflyMSC(IFlyContact.o)
  "_CNContactGivenNameKey", referenced from:
      -[IFlyContact fetchContactWithContactStore:] in iflyMSC(IFlyContact.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
报错的图片.png

最终解决方案 添加Contacts.framework

解决方案.png
上一篇下一篇

猜你喜欢

热点阅读