【问题标题】:Google-Maps-iOS-Utils with google maps missing GMSGeometryUtils.h缺少 GMSGeometryUtils.h 的谷歌地图的 Google-Maps-iOS-Utils
【发布时间】:2016-08-03 10:03:49
【问题描述】:

我已经为此苦苦挣扎了几个小时,我不明白出了什么问题。我仔细遵循了谷歌的 iOS 集群设置,但无论我做什么它都不起作用。我收到此错误:

.../Pods/Google-Maps-iOS-Utils/src/Clustering/Algo/GMUNonHierarchicalDistanceBasedAlgorithm.m:22:9:未找到“GoogleMaps/GMSGeometryUtils.h”文件

我已经安装了以下内容:

Using Alamofire (3.4.1)
Using Google-Maps-iOS-Utils (1.0.0)
Using GoogleMaps (1.9.2)

Pod 文件:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.3'
use_frameworks!

pre_install do |installer|
        def installer.verify_no_static_framework_transitive_dependencies; end
    end
target 'Happevents' do
    pod 'GoogleMaps' # Objective-C pod
    pod 'Google-Maps-iOS-Utils' # Objective-C pod
    pod 'Alamofire', '~> 3.4' # Swift pod
end

【问题讨论】:

  • 我发现的一件事是,如果我删除 use_frameworks!然后 Alamofire 会出错。

标签: ios swift google-maps cocoapods markerclusterer


【解决方案1】:

我通过 pod 安装在我的项目中安装了 Google-Maps-iOS-Utils。请更新您的 pod 文件

target 'Happevents' do
pod 'GoogleMaps' # Objective-C pod
pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils'
pod 'Alamofire', '~> 3.4' # Swift pod

结束

【讨论】:

  • 报错:[!] 用 Swift 编写的 Pod 只能作为框架集成;将use_frameworks! 添加到您的 Podfile 或目标以选择使用它。使用的 Swift Pod 是:Alamofire
【解决方案2】:

您应该从您的 pod 文件中删除 use_frameworks!

【讨论】:

    【解决方案3】:

    There is a manual 来自 Google 如何在 Swift 和 use_frameworks 中使用他们的库!你也可以check this one

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-06-30
      • 2017-08-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-11
      相关资源
      最近更新 更多