close
CocoaPods not installed or not in valid state, CocoaPods not installed, cocoaPods not in valid state, sudo gem install cocoapods, sudo gem uninstall cocoapods

[Solved] CocoaPods not installed or not in valid state

Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track. CocoaPods not installed or not in valid state in a flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How CocoaPods not installed or not in valid state Error Occurs ?

I am just try to run my app in my Simulator But it give me following error.

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
To re-install:
  sudo gem install cocoapods

CocoaPods not installed or not in valid state.
Error launching application on iPhone 11 Pro Max.

How to Solve CocoaPods not installed or not in valid state Error?

  1. How to Solve CocoaPods not installed or not in valid state Error?

    To Solve CocoaPods not installed or not in valid state Error One and easy solution is you have to reinstall cocoapods. Usually, this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension. Open your terminal and run sudo gem uninstall cocoapods sudo gem install cocoapods restart IDE or Editor Now your error must be solved.

  2. CocoaPods not installed or not in valid state

    To Solve CocoaPods not installed or not in valid state Error One and easy solution is you have to reinstall cocoapods. Usually, this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension. Open your terminal and run sudo gem uninstall cocoapods sudo gem install cocoapods restart IDE or Editor Now your error must be solved.

Solution 1 : Reinstall cocoapods

One and easy solution is you have to reinstall cocoapods. Usually this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension.

  1. Open your terminal and run
  2. sudo gem uninstall cocoapods
  3. sudo gem install cocoapods
  4. restart IDE or Editor
  5. Now your error must be solved.

Solution 2: Uninstall multiple cocoapods

This problem is occurs because of you have multiple versions of cocoapods installed. You can check and resolve it running:

  • gem list check to see if multiple versions of cocoapod are installed
  • sudo gem uninstall cocoapods it will prompt you to select which one to uninstall, or if you want to uninstall all
  • sudo gem install cocoapods
  • Open your terminal in root level of your project
  • Change to the iOS directory of your Flutter project
  • pod install
  • Now your error must be solved.

Solution 3 : Flutter clean

Following worked for me

  1. Clean projct
  2. User terminal to flutter run
  3. Its an IDE related issue not flutter or cocoapods

Solution 4 : pod install

reinstalling cocoapods and running pod install:

sudo gem list
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem install cocoapods

Changed to ios directory for my project

pod install

Summery

So, It’s All About CocoaPods not installed or not in valid state Error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.

Also Check Out Below Tutorials


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *