我得到了最近讨论的“Xcode 10错误:多个命令产生...”错误,但是对于我的项目的结果app和appex文件。有谁知道这意味着什么。我的项目有一个应用程序和两个扩展(只有一个是错误的一部分)。
Showing Recent Messages
Prepare build
note: Using new build systemnote: Planning buildnote: Constructing build description
Build system information
error: Multiple commands produce '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev.app':
1) Target 'MyApp Dev' has create directory command with output '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev.app'
2) That command depends on command in Target 'MyApp Dev': script phase “[CP] Copy Pods Resources”
Build system information
error: Multiple commands produce '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev Share Extension.appex':
1) Target 'MyApp Dev Share Extension' has create directory command with output '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev Share Extension.appex'
2) That command depends on command in Target 'MyApp Dev Share Extension': script phase “[CP] Copy Pods Resources”
Build system information
warning: ignoring duplicated output file: '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev.app' (in target 'MyApp Dev')
Build system information
warning: ignoring duplicated output file: '/Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-enqofdpadskdcgemmhrzsxahnjet/Build/Products/Debug-iphoneos/MyApp Dev Share Extension.appex' (in target 'MyApp Dev Share Extension')
Build failed 18.09.18, 10:28 4.5 seconds
我知道我可以回到遗留构建系统,但我更喜欢使用新的更快的构建系统。感谢您的任何帮助。
通过将Cocoapods从1.4.0更新到1.5.3解决了我的问题
如果您的错误没有通过更新可可豆荚消失,那么只需创建新项目,但更改文件夹位置。你不会得到这个错误。
关键是要做pod deintegrate
和rm *.workspace
文件!
我有这样的问题。 。 。对我有用的解决方案是转到Project Target并在Copy Bundle Resources下删除文件的重复引用。希望这可以帮助!!!
如果有人在更新cocoapods并重新安装pod之后仍在努力解决这个问题:
${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}
。我删除它,构建成功我的Cocoapod版本已经是1.5.3(最新)。只运行“pod install”(或“pod install --no-repo-update”,如果你不想更新现有的pod)解决了它。
我的解决方法:
pod --version
。通过运行sudo gem install cocoapods
,将Coacoapods更新到最新版本 - 如果不是,则更新v1.5.3pod update
更新所有podinfo.plist
删除重复的Target>Build Phases>Copy
Bundle Resources
文件。适合我:
你可能遇到过这个由CocoaPods issue引起的Xcode issue
这个reply可能对你有所帮助,它建议在你的Podfile中明确指定子规格。
例如,使用pod 'SDWebImage/Core'
而不是pod 'SDWebImage'
显然,这会导致构建产品路径始终包含可能解决问题的子规范名称。
在“共享工作区设置”中将“构建系统”设置为“旧版构建系统”,您可以在“文件 - >工作区设置”中找到它
就我而言,App Target的Copy Bundle Resources
中有重复引用。我刚刚删除了其中一个而且工作正常。