Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CocoaPods not installed or not in valid state

Tags:

ios

flutter

dart

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. 
like image 768
rahul rawat Avatar asked Jun 26 '20 11:06

rahul rawat


People also ask

How do I know if CocoaPods is installed on my Mac?

To find if Cocoapods is installed or not run cmd (pod --version). if theresult is (Not Found) Pods is not installed.

Do I need CocoaPods for flutter?

For macOS desktop development, you need the following in addition to the Flutter SDK: Xcode. CocoaPods if you use plugins.


2 Answers

usually this happens due to visual studio or IntelliJ not able to find the path or associated plugin or extension.

here is the solution:

  1. sudo gem uninstall cocoapods && sudo gem install cocoapods
  2. restart IDE or Editor

the last step should solve the issue if not close the project entirely

like image 186
Agyakwalf Avatar answered Sep 28 '22 03:09

Agyakwalf


Someone I know had this issue, and another person recommended this fix.

Run this command from terminal:

open /Applications/Android\ Studio.app 

The issue is that there are 3 possible resource paths where you put paths to your configs....

  • 1st is the ~/.profile
  • 2nd is the ~/.zshrc.
  • 3rd is the ~/.bashrc.

So what happens is that when the path to your configs is not in the ~/.profile file, it can't be accessed from the opening link from the launchpad. Whenever you open a terminal session, all 3 paths are synchronised automatically. That's the difference.

like image 25
Beethoventhepoet Avatar answered Sep 28 '22 04:09

Beethoventhepoet