skip to Main Content

I am encountering an issue while installing pods in my React Native project using CocoaPods. After executing pod install, I receive the following error:

[!] CocoaPods could not find compatible versions for pod
"GoogleMLKit/FaceDetection": In Podfile:
react-native-face-detection (from ../node_modules/react-native-face-detection) was resolved to 0.1.1,
which depends on
GoogleMLKit/FaceDetection (= 2.2.0)

vision-camera-face-detector (from `../node_modules/vision-camera-face-detector`) was resolved to 0.1.8,

which depends on
GoogleMLKit/FaceDetection

None of your spec sources contain a spec satisfying the dependencies:
GoogleMLKit/FaceDetection (= 2.2.0), GoogleMLKit/FaceDetection.

You have either: * out-of-date source repos which you can update with
pod repo update or with pod install --repo-update. * mistyped the
name or version. * not added the source repo that hosts the Podspec
to your Podfile.

It seems there is a conflict regarding the dependencies related to GoogleMLKit/FaceDetection. I have tried updating the pod repos using pod repo update and pod install –repo-update, but the issue persists.

Here is a snippet from my Podfile:

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

  pod 'RNFS', :path => '../node_modules/react-native-fs'

  pod 'GoogleMLKit/FaceDetection', '2.2.0'
  pod 'GoogleMLKit/MLKitCore', '2.2.0'
  pod 'GoogleMLKit/TextRecognition', '2.6.0'

2

Answers


  1. have you tried to delete the Pods and the Podfile.lock ?

    cd ios => rm-rf Pods Podfile.lock => Pod install

    Maybe this can help to fix, if not try to delete node_modules before and install all packages again, them delete Pods Podfile.lock and Pod install. I hope this can help.

    Login or Signup to reply.
  2. 1)remove the podfile
    2)reset cache
    3)restart metro bundler
    4)try reinstalling pods again.
    Also make sure you have recent updated version of cocoapods installed

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search