Xcode 10错误:为'app'和'appex'生成多个命令

Nor*_*ert 24 ios xcode10

我得到了最近讨论的"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
Run Code Online (Sandbox Code Playgroud)

我知道我可以回到遗留构建系统,但我更喜欢使用新的更快的构建系统.感谢您的任何帮助.

Nor*_*ert 30

通过将Cocoapods从1.4.0更新到1.5.3解决了我的问题


小智 29

如果有人在更新cocoapods并重新安装pod之后仍在努力解决这个问题:

  1. 打开目标的构建阶段,为您提供问题
  2. 打开Copy Pods Resources阶段.
  3. 确保输出文件为空.在我的情况下,我有一个奇怪的条目${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}.我删除它,构建成功


小智 20

我能够通过在Xcode 10中打开Runner工作区项目来修复它.然后导航到File,Workspace Settings并将构建系统更改为Legacy Build System.

图像显示了它的变化

  • 那行得通,但是我更喜欢使用新的更快的构建系统,而不是旧的懒惰系统。 (5认同)
  • 有什么解决方案可以让它与新的构建系统一起工作吗? (2认同)

小智 11

我的Cocoapod版本已经是1.5.3(最新).只运行"pod install"(或"pod install --no-repo-update",如果你不想更新现有的pod)解决了它.


小智 8

在“共享工作区设置”中将“构建系统”设置为“传统构建系统”,您可以在“文件 --> 工作区设置”中找到该设置


chr*_*ijk 6

我的解决方法:

  1. 检查您的pod版本pod --version.将Coacoapods更新到最新版本 - 如果不是,则通过运行更新v1.5.3sudo gem install cocoapods

  2. 通过运行更新所有pod pod update

  3. 删除重复info.plist文件(Target>Build Phases>Copy Bundle Resources如果有).


ofc*_*ift 5

我的作品:

  • 更新Cocoapods
  • 删除pod文件(不要忘记将内容复制到其他位置,因此可以将其还原
  • 删除工作区项目文件
  • 删除锁荚文件
  • 删除容器目录
  • 关闭Xcode
  • 初始化吊舱
  • 安装吊舱
  • 打开工作区项目。


归档时间:

查看次数:

22417 次

最近记录:

6 年,11 月 前