ioscocoapods

CocoaPods could not find compatible versions for pod GoogleDataTransport when installing GoogleMLKit Face Detection


So I tried to install ML Kit Face Detection library by following this documentation, so first I added this line in my podfile:

pod 'GoogleMLKit/FaceDetection'

Unfortunately after I tried to install it I got this error on terminal:

[!] 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.

And I added more pod like this:

pod 'MLKitCommon'
pod 'GoogleMLKit/MLKitCore'

But now I got this error on the terminal:

[!] 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.

After a bit of research I tried to run pod install --repo-update but it still give me that error. Is there anyway to resolve this?


Solution

  • This fixed the problem for me:

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