ios - Xcode 10 错误 : Multiple commands produce for 'app' and 'appex'

标签 ios xcode10

我遇到了最近讨论的“Xcode 10 错误:多个命令产生...”错误,但针对的是我项目的生成应用程序和 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 并重新安装 pod 后仍然为此苦苦挣扎:

  1. 打开给您带来问题的目标的构建阶段
  2. 打开 Copy Pods Resources 阶段。
  3. 确保输出文件为空。在我的例子中,我有一个奇怪的条目 ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}。我删除了它,构建成功

关于ios - Xcode 10 错误 : Multiple commands produce for 'app' and 'appex' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52382667/

相关文章:

swift - 无法打开依赖文件 Swift 4.2

ios - 禁用位置服务后立即显示警报 View

ios - 如何处理 ARC 下的 void* cast?

iphone - 使用仪器检测 C 泄漏(泄漏)

ios - Xcode 附加到进程不显示 NSLog

ios - Xcode 10 无法在设备上运行 XCTest/XCUITest

ios - 查找移植到 ios 的 ionic 应用程序的 xcode 项目名称以启动多个模拟器

Xcode 10 似乎破坏了 com.apple.commcenter.coretelephony.xpc

ios - 动态宽度大小以适应 stackview 中的控件

ios - 无法将类型 'Dictionary<String?, String?>.Keys' 的值分配给类型 'String'