【问题标题】:Cocoapods: Error when adding Google Maps iOS SDKCocoapods:添加 Google Maps iOS SDK 时出错
【发布时间】:2017-12-18 17:51:31
【问题描述】:

我正在按照url 的说明安装适用于 iOS 的 Google Maps SDK。

使用 1.1.1 版运行 pod update 时出现错误。

[!] The 'Pods-[Target Name]' target has frameworks with conflicting names: googlemapsbase.framework and googleplaces.framework.

有人解决过这个问题吗?

编辑:

这是我正在使用的 Podfile。

platform :ios, '10.0'
source 'https://github.com/CocoaPods/Specs.git'

target 'Woof' do
  use_frameworks!

  pod 'Alamofire'
  pod 'FBSDKLoginKit'
  pod 'TextAttributes', '~> 1.0'
  pod 'Moya'
  pod 'Moya-ObjectMapper', '2.3.1'
  pod 'ObjectMapper', '2.2.6'
  pod 'KeychainSwift', '~> 8.0'
  pod 'DateTools'
  pod 'SnapKit', '~> 3.2'
  pod 'IQKeyboardManagerSwift', '~> 4.0'
  pod 'Stripe', '10.2.0'
  pod 'SVProgressHUD', '~> 2.1' #might change
  pod 'QuickBlox'
  pod 'SDWebImage'
  pod 'Cosmos'
  pod 'JTAppleCalendar', '~> 7.0.2'
  pod 'JSQMessagesViewController'
  pod 'ImageSlideshow'
  pod 'ImageSlideshow/SDWebImage'
  pod 'Eureka'
  pod 'ImageRow'
  pod 'SuggestionRow'
  pod 'GooglePlacesRow'
  pod 'FacebookCore'
  pod 'FacebookLogin'
  pod 'BSImagePicker'
  pod 'OnboardingKit'
  pod 'DZNSegmentedControl'
  pod 'ReadMoreTextView'
  pod 'DZNEmptyDataSet'
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'MGSwipeTableCell'
  pod 'KMPlaceholderTextView', '~> 1.3.0'
  pod 'TTRangeSlider'
  pod 'Firebase/Core'
  pod 'GoogleMaps'
  pod 'GooglePlaces'

  target 'WoofTests' do
    inherit! :search_paths
  end

  target 'WoofUITests' do
    inherit! :search_paths
  end

end

编辑 2:

GooglePlacesRow 库似乎已经在导入 Google Maps 和 Google Places。删除最后两行即可解决此问题:

pod 'GoogleMaps'
pod 'GooglePlaces'

【问题讨论】:

  • 你能展示你的整个podifle吗?
  • @ChrisAllwein 添加

标签: ios google-maps cocoapods google-maps-sdk-ios cocoapods-1.1.1


【解决方案1】:

(截至 2017 年 7 月 23 日)我认为这可能是由于 GooglePlacesRow 具有 GooglePlaces 2.0.1 作为依赖项,但当前版本(您也包括)是 2.3.1。我会尝试从您的 podfile 中删除 pod 'GooglePlaces' 行。它仍应作为 GooglePlacesRow 的依赖项安装。

【讨论】:

  • 感谢您的回答。我认为这就是问题所在。我删除了它,我仍然收到The 'Pods-[target name]' target has frameworks with conflicting names: googlemapsbase.framework.
  • 很可能,GoogleMaps 和 GooglePlaces 都使用 googlemapsbase.framework。尝试将 GoogleMaps 行替换为 GoogleMaps , '~> 2.0.1'。或者,它可能可以通过 CocoaPods 使用 GoogleMaps 和 GooglePlaces,只需将代码直接复制到您的项目中即可包含 GooglePlacesRow。
  • 是的,图书馆已经在导入谷歌地图图书馆。我认为正确的反应是删除这两行。
猜你喜欢
  • 2023-03-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-08
  • 1970-01-01
相关资源
最近更新 更多