CocoaPods 在快照中找不到 pod FirebaseCore 的兼容版本 (Podfile.lock):

CocoaPods could not find compatible versions for pod FirebaseCore In snapshot (Podfile.lock):

我收到命令 pod install 的以下错误,未被 this

解决
[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
  In snapshot (Podfile.lock):
    FirebaseCore (= 3.6.0, ~> 3.6)

  In Podfile:
    Firebase/Crashlytics was resolved to 6.15.0, which depends on
      FirebaseCrashlytics (~> 4.0.0-beta.1) was resolved to 4.0.0-beta.1, which depends on
        FirebaseCore (>= 6.3.2, ~> 6.3)

    Google/Analytics was resolved to 3.1.0, which depends on
      Google/Core (= 3.1.0) was resolved to 3.1.0, which depends on
        FirebaseAnalytics (~> 3.2) was resolved to 3.9.0, which depends on
          FirebaseCore (~> 3.6)

这是我的 Podfile,

# Uncomment this line to define a global platform for your project
platform :ios, '9.0'

target 'MyProject' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  pod 'FBSDKCoreKit', '~>5.15.1'
  pod 'FBSDKShareKit', '~>5.15.1'
  pod 'FBSDKLoginKit', '~>5.15.1'
  pod 'Google/Analytics'
  pod 'GoogleMaps'
  pod 'CocoaLumberjack'
  pod 'Firebase/Crashlytics'
  pod 'Firebase/Analytics'

  target 'MyProjectTests' do
    inherit! :search_paths
  end

  target 'MyProjectUITests' do
    inherit! :search_paths
  end

end

如何解决这个问题?

您可以通过检查生成的 Podfile.lock 文件来了解 CocoaPods 选择哪些依赖项的原因。

我怀疑这个问题与使用已弃用的 Google pod 有关。您可能应该使用不带斜线的 GoogleAnalytics