Skip to content

[flutter doctor] Cocoapods was not found even after sudo gem install cocoapods #61230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
huyabin opened this issue Jul 10, 2020 · 13 comments
Closed
Labels
a: first hour The first hour of using Flutter P3 Issues that are less important to the Flutter project platform-ios iOS applications specifically t: flutter doctor Problem related to the "flutter doctor" tool team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team

Comments

@huyabin
Copy link

huyabin commented Jul 10, 2020

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.20.0-8.0.pre.41, on Mac OS X 10.14.6 18G5033,
    locale zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS (Xcode 11.3)
    ! Unknown CocoaPods version installed.
        Flutter is unable to determine the installed CocoaPods's version.
        Ensure that the output of 'pod --version' contains only digits and . to
        be recognized by Flutter.
      To upgrade:
        sudo gem install cocoapods
[✓] Android Studio (version 3.4)
[!] IntelliJ IDEA Ultimate Edition (version 2020.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.46.1)
[✓] Connected device (1 available)

! Doctor found issues in 2 categories.
➜  ~ pod --version
Resolving dependencies...
1.9.3
@TahaTesser
Copy link
Member

Hi @huyabin
Please all the follow steps in iOS setup

You can see one of the steps is to Cocoapods from your flutter doctor -v, execute sudo gem install cocoapods in your terminal

[!] Xcode - develop for iOS and macOS (Xcode 11.3)
! Unknown CocoaPods version installed.
Flutter is unable to determine the installed CocoaPods's version.
Ensure that the output of 'pod --version' contains only digits and . to
be recognized by Flutter.
To upgrade:
sudo gem install cocoapods

Thank you

@TahaTesser TahaTesser added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Jul 10, 2020
@huyabin
Copy link
Author

huyabin commented Jul 13, 2020

After sudo gem install cocoapods ,pod version is 1.9.3. but prompt not found cocoapods

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 13, 2020
@huyabin
Copy link
Author

huyabin commented Jul 13, 2020

屏幕快照 2020-07-13 下午12 32 33

@TahaTesser TahaTesser added a: first hour The first hour of using Flutter platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. and removed in triage Presently being triaged by the triage team labels Jul 13, 2020
@TahaTesser TahaTesser changed the title Cocoapods was not found [flutter doctor] Cocoapods was not found even after sudo gem install cocoapods Jul 13, 2020
@jmagman
Copy link
Member

jmagman commented Jul 14, 2020

I guess it's parsing Resolving dependencies... ? I don't have that output.

@jmagman jmagman added the t: flutter doctor Problem related to the "flutter doctor" tool label Jul 14, 2020
@xiakehc
Copy link

xiakehc commented Sep 24, 2020

have solve method, I have same problem

@davidpanic
Copy link

Has anyone been able to get around this issue? I can't build my app because of this. I'm also getting Resolving dependencies... in the output of pod --version

@mateuszjablonski
Copy link

I had this exact issue, but now it's gone. I am not able to pinpoint exact solution, but here's what I did:

  • removed RVM - it was using Ruby 2.7
  • installed Ruby 3.0 using Homebrew

@danieldocki
Copy link

Same issue

➜ flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-BR)
    • Flutter version 2.2.3 at /Users/danieldocki/.asdf/installs/flutter/2.2.3-stable
    • Framework revision f4abaa0735 (3 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/danieldocki/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.58.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114

! Doctor found issues in 1 category.


➜ pod --version
1.10.1


➜ which pod
/Users/danieldocki/.gem/bin/pod

@jmagman
Copy link
Member

jmagman commented Jul 20, 2021

➜ which pod
/Users/danieldocki/.gem/bin/pod

Weird, that's all the tool is doing. You can see it in a `flutter doctor -vv

[   +8 ms] executing: which pod

Future<bool> get isInstalled =>
_processUtils.exitsHappy(<String>['which', 'pod']);

Though you are actually seeing ✗ CocoaPods not installed. whereas the originator reported a broken install, which means it's installed but the version can't be parsed.

@danieldocki
Copy link

➜ which pod
/Users/danieldocki/.gem/bin/pod

Weird, that's all the tool is doing. You can see it in a `flutter doctor -vv

[   +8 ms] executing: which pod

Future<bool> get isInstalled =>
_processUtils.exitsHappy(<String>['which', 'pod']);

Though you are actually seeing ✗ CocoaPods not installed. whereas the originator reported a broken install, which means it's installed but the version can't be parsed.

I found out what was going on in my environment, I just don't understand why, I use asdf as a package manager for ruby, nodejs, flutter, etc.

I ran the flutter doctor -v command in a blank folder and it gave the error I reported, and then I ran the same command in a project folder and it worked.

I noticed that this project had nodejs in .tools-versions and was at version 15.13.0, but in global it was 14.17.3, I changed the global nodejs version to 15.13.0 and flutter doctor -v everything was ok.

Now what is nodejs' relationship with flutter I don't know.

@araafat3
Copy link

araafat3 commented Mar 31, 2022

i have the same issue and detect it when you use flutter doctor from android studio the issue is appear
and if you write flutter doctor --verbose from terminal not appear

so use terminal for now instead of android studio button till issue solved

@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
@stuartmorgan-g stuartmorgan-g added the P2 Important issues not at the top of the work list label Jul 25, 2023
@jmagman jmagman added P3 Issues that are less important to the Flutter project and removed P2 Important issues not at the top of the work list labels Feb 8, 2024
@pratikpanchal13
Copy link

To resolve this issue, please add the following line to your Gemfile:

gem "activesupport", "= 7.0.8"

@jmagman
Copy link
Member

jmagman commented May 20, 2025

We aren't investing further in CocoaPods tooling. You can follow along with our Swift Package Manager adoption here #126005.

@jmagman jmagman closed this as completed May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: first hour The first hour of using Flutter P3 Issues that are less important to the Flutter project platform-ios iOS applications specifically t: flutter doctor Problem related to the "flutter doctor" tool team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy