【问题标题】:Using 'GoogleMaps' and 'GooglePlaces' pods, when archiving iOS build receive error for multiple commands produce GoogleUtilities target使用 'GoogleMaps' 和 'GooglePlaces' pod,在归档 iOS 构建时,多个命令的接收错误会产生 GoogleUtilities 目标
【发布时间】:2018-09-26 17:13:45
【问题描述】:

归档时遇到问题 - 我收到一个构建系统信息错误,提示

Multiple commands produce '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework':
1) Target 'GoogleUtilities-00567490' has create directory command with output '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
2) Target 'GoogleUtilities-ac14cd06' has create directory command with output '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'

我最近更新到了最新版本的 Xcode (v 10.0)。我也在使用 Cocoapod 版本 1.6.0.beta.1

使用 GoogleMaps pod 2.7.0 版、GooglePlaces pod 2.7.0 版 当我运行“pod install”时,它还会安装“GoogleUtilities (5.3.0)”。

我尝试删除我的 Podlock、Podfile、.xcworkspace 等,并在更新 Cocoapods 后重新开始使用新的 Podfile、pod init、pod install 等,但仍然没有运气。

我在 Embed Pod 框架的构建阶段中寻找与 GoogleUtilities 或 Places 或 Maps 相关的副本,但运气不佳。当我查看 Pods 文件夹时,我确实看到了两个 GoogleUtilities 框架,“GoogleUtilities-00567490”和“GoogleUtilities-ac14cd06”,但两者的内容似乎并不完全相同。

仅在将 Xcode 更新到 10.0 版后才遇到此问题。

【问题讨论】:

  • Podfile 中有什么?
  • 这不是因为“GoogleMaps”和“GooglePlaces”。您可以删除 GoogleMaps,因为 GooglePlaces 无论如何都会安装它。问题是您的项目中有多个目标,并且您在两个目标中都使用了“GooglePlaces”(或“Firebase”或任何其他依赖于 GoogleUtilities 的 pod)。新构建系统似乎存在一些问题,在归档它时会复制从所有目标的 pod 生成的框架。这就是旧版构建系统起作用的原因。
  • @abhinavroy23 是的,我的项目中有多个目标,因为我有一个用于开发应用程序、生产应用程序和测试目标的目标。感谢您提供有关删除 Google 地图的提示。当然也使用 Firebase。希望新构建系统的问题得到解决,或者也许有一种方法可以更好地订购我的 Podfile
  • 我很高兴@Brown 您是否使用旧版构建系统来解决此问题?我遇到了类似的问题,也在寻找其他解决方法,如果你发现了什么,请告诉我。
  • @abhinavroy23 是的,我使用 Legacy Built 系统作为解决方法。目前我不知道任何其他解决方案。

标签: xcode cocoapods google-places-api google-maps-sdk-ios xcode10


【解决方案1】:

对我来说,同样的问题即将到来,大多数人都说要将构建系统更改为旧版,但是当我尝试它时,它启动了 swift 编译器错误。如下所述解决。

  1. 转到您的目标并点击(your_app_name_target)。
  2. 选择构建阶段
  3. 展开复制 Pod 资源
  4. 请参阅输出文件部分。
  5. 此部分应为空。 删除那里的所有条目
  6. 重建您的项目。

【讨论】:

    【解决方案2】:

    转到文件 > 工作区设置,然后将构建系统从“新构建系统(默认)”更改为“旧版构建系统”,您现在可以存档。希望在 Xcode 10.0 中使用这些 pod 和新构建系统的另一种解决方案

    【讨论】:

      猜你喜欢
      • 2021-06-13
      • 1970-01-01
      • 1970-01-01
      • 2020-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-13
      • 2020-12-01
      相关资源
      最近更新 更多