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?
- 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.
- 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.
- Open your terminal and run
- sudo gem uninstall cocoapods
- sudo gem install cocoapods
- restart IDE or Editor
- 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 installedsudo gem uninstall cocoapods
it will prompt you to select which one to uninstall, or if you want to uninstall allsudo 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
- Clean projct
- User terminal to flutter run
- 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
- How to open a web browser (URL) from Flutter code?
- How to solve Flutter could not find tools.jar?
- Flutter Error : No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase
- Flutter: Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized
- How to change package name in flutter?
Leave a Reply