Closed
Description
Hello I get this problem when I try to launch my app on android studio (on Mac ):
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
Exception: CocoaPods not installed or not in valid state.
flutter doctor
Woah! You appear to be trying to run flutter as root.
We strongly recommend running the flutter tool without superuser privileges.
/
📎
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.18.0-5.0.pre.89, on Mac OS X 10.15.4 19E287, locale en-TN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Xcode - develop for iOS and macOS (Xcode 11.4.1)
✗ CocoaPods installed but not working.
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 CocoaPods, run:
sudo gem install cocoapods
[✓] Android Studio (version 3.6)
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
VladyslavBondarenko commentedon Apr 17, 2020
Hi @medlmd
does the proposed command
sudo gem install cocoapods
help?medlmd commentedon Apr 17, 2020
avvari-da commentedon Apr 17, 2020
sudo gem install cocoapods
this worked for me. Although there were some issues (suggestions came up). Ran the following additionally (in same order):sudo gem pristine ffi --version 1.12.2
sudo gem pristine executable-hooks --version 1.6.0
sudo gem pristine gem-wrappers --version 1.4.0
sudo gem regenerate_binstubs
sudo gem pristine --binstubs
Hope this helps!
VladyslavBondarenko commentedon Apr 17, 2020
@medlmd
could you check workarounds from #14293?
medlmd commentedon Apr 18, 2020
Hello, I get this
sudo gem pristine executable-hooks --version 1.6.0
ERROR: While executing gem ... (Gem::Exception)
Failed to find gems ["executable-hooks"] = 1.6.0
VladyslavBondarenko commentedon Apr 20, 2020
@medlmd
doesn't it help #41291 (comment)?
(you can try with 1.9.0 version)
medlmd commentedon Apr 20, 2020
[-]I can't launch my app [/-][+]CocoaPods not installed or not in valid state[/+]10 remaining items
jmagman commentedon May 11, 2020
@jrnelson333 Can we get logs with the verbose
-v
flag?jmagman commentedon May 19, 2020
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
oakmad commentedon May 28, 2020
Resolved:
Turns out it wasn't an issue with cocoapods per se. I did three things
sudo gem update
After that everything worked just fine.
Original report:
I'm encountering the same issue, with debug not running on the iOS simulator when flutter doctor checks out OK. If I find a solution I will post it here.
Error when running debug:
Doctor output:
edgarfroes commentedon May 28, 2020
Just did what the @oakmad said above and it worked. In my case, it was the Dart plugin for VS Code that was awaiting for a restart to update, so I had to close and reopen VS Code, got the "Dart Code has been updated to 'xxx'" and I was able to debug on my device properly.
zentby commentedon May 29, 2020
Very weird. It even complains after I upgraded the cocoapods:

zentby commentedon May 29, 2020
it turns out that my path has the wrong version of gems.

It was pointing to the 2.6.0 folder. After I switched to 2.7.0, problem solved.
22 remaining items