CocoaPods 在安装 GoogleMLKit Face Detection 时找不到 pod GoogleDataTransport 的兼容版本

lle*_*ram 1 ios cocoapods

所以我尝试按照这个文档安装 ML Kit Face Detection 库,所以首先我在我的podfile

pod 'GoogleMLKit/FaceDetection'
Run Code Online (Sandbox Code Playgroud)

不幸的是,在我尝试安装它后,我在终端上遇到了这个错误:

[!] CocoaPods could not find compatible versions for pod "GoogleDataTransportCCTSupport":   In snapshot (Podfile.lock):
    GoogleDataTransportCCTSupport (= 2.0.1, ~> 2.0)

  In Podfile:
    GoogleMLKit/FaceDetection was resolved to 0.60.0, which depends on
      GoogleMLKit/MLKitCore (= 0.60.0) was resolved to 0.60.0, which depends on
        MLKitCommon (~> 0.60.0) was resolved to 0.60.0, which depends on
          GoogleDataTransportCCTSupport (~> 1.2)

Specs satisfying the `GoogleDataTransportCCTSupport (= 2.0.1, ~> 2.0), GoogleDataTransportCCTSupport (~> 1.2)` dependency were found, but they required a higher minimum deployment target.
Run Code Online (Sandbox Code Playgroud)

我添加了更多这样的吊舱:

pod 'MLKitCommon'
pod 'GoogleMLKit/MLKitCore'
Run Code Online (Sandbox Code Playgroud)

但是现在我在终端上遇到了这个错误:

[!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
  In snapshot (Podfile.lock):
    GoogleDataTransport (= 5.1.0, ~> 5.1)

  In Podfile:
    GoogleMLKit/MLKitCore was resolved to 0.60.0, which depends on
      MLKitCommon (~> 0.60.0) was resolved to 0.60.0, which depends on
        GoogleDataTransport (~> 3.2)

Specs satisfying the `GoogleDataTransport (= 5.1.0, ~> 5.1), GoogleDataTransport (~> 3.2)` dependency were found, but they required a higher minimum deployment target.
Run Code Online (Sandbox Code Playgroud)

经过一些研究,我尝试运行,pod install --repo-update但它仍然给我那个错误。有没有办法解决这个问题?

lle*_*ram 11

这为我解决了问题:

  1. pod deintegrate
  2. sudo gem install cocoapods-clean
  3. pod clean
  4. pod setup
  5. pod install

  • 已针对 Xcode 14.0.1 进行测试并完美运行,最低部署目标为 iOS 13 (2认同)