skip to Main Content

I get this error when trying to run my app. "CocoaPods not installed or not in valid state."

This was never an error just minutes ago. How do I fix this? I’ve tried different suggestions, but none worked. I tried running ‘sudo gem install cocoapods’, but after I did it never seemed to finish installing. So I terminated the process, thinking maybe it just installed and didn’t let me know it finished, and of course, I still get the same error. Any suggestions are appreciated, as I have no clue what to do next.

2

Answers


  1. Chosen as BEST ANSWER

    I fixed it. This is what I did: I had a dependency in my pubspec.yaml file, called "image picker". I deleted it, ran pub get, and then the error fixed itself. I also updated to the latest Android Studio, but I do not know if that helped or not. I hope the solution I found can help someone else.


  2. Try this!

    sudo gem install cocoapods

    cd ios/

    pod repo update

    rm -rf Podfile.lock

    Pods pod install

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