7

Iam using Mac and upgraded to Android studio "Bumblebee", only in Mac when I try to do: Build -> Flutter -> Build iOS it shows this warning:

Warning: CocoaPods not installed. Skipping pod install. 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. CocoaPods not installed or not in valid state. Process finished with exit code 1

But I did already this gem install cocoapods Successfully installed cocoapods-1.11.2 Parsing documentation for cocoapods-1.11.2 Done installing documentation for cocoapods after 1 seconds 1 gem installed

When I do sudo gem install cocoapods I got: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.

I did Invalidate Caches and pod install also, but it still shows same warning.

Flutter doctor [✓] Flutter (Channel stable, 2.8.1, on macOS 11.0.1 20B29 darwin-x64, locale en-GB) • Flutter version 2.8.1 at /Users/test/Downloads/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800 • Engine revision 890a5fca2e • Dart version 2.15.1

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/test/Library/Android/sdk ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[!] Xcode - develop for iOS and macOS (Xcode 12.5.1) • Xcode at /Applications/Xcode.app/Contents/Developer ! Flutter recommends a minimum Xcode version of 13.0.0. Download the latest version or update via the Mac App Store. ✗ 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 (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2021.1) • Android Studio at /Users/test/Desktop/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.11+0-b60-7590822)

How to fix it? Regards

blue492
  • 540
  • 1
  • 6
  • 21
  • sudo gem install cocoapods --pre -n /usr/local/bin – TheFunk Jan 27 '22 at 14:31
  • I did it now and got: Successfully installed cocoapods-1.11.2 Parsing documentation for cocoapods-1.11.2 Done installing documentation for cocoapods after 2 seconds 1 gem installed But when I try to do: Build -> Flutter -> Build iOS it still show same warning: Warning: CocoaPods not installed. Skipping pod install. – blue492 Jan 27 '22 at 14:42
  • Try using brew to install cocoapods instead. so: `sudo gem uninstall cocoapods` then `brew install cocoapods` and then `brew link --overwrite cocoapods` – TheFunk Jan 27 '22 at 15:48
  • I'm pretty sure when I installed cocoapods I had the same issue and the brew install was the only way to make it work. – TheFunk Jan 27 '22 at 15:49
  • When I use brew it show me this: zsh: command not found: brew – blue492 Jan 27 '22 at 15:56
  • Brew has to be installed first. Then you can run brew install cocoapods. – TheFunk Jan 27 '22 at 19:39

4 Answers4

28
  1. close android studio
  2. open terminal -> run open /Applications/Android\ Studio.app
  3. try again ...

problem comes with new android studio version bumblebee

android studio started from macs dock is not able to reach the environment variables when its started from mac os dock

UPDATE:

run chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv

now it works from dock

Maurice Raguse
  • 4,437
  • 2
  • 29
  • 46
1

Just run this at terminal: run chmod +x /Applications/Android\ Studio.app/Contents/bin/printenv

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 01 '22 at 18:40
0

The issue appears to be Cocopods not being installed with Big Sur or above. I found upgrading Ruby to a newer version and then installing Cocopods helped my coworker. Please follow the steps in the solution for installing Cocopods: Unable to install cocoa pods

Snorkeler
  • 326
  • 2
  • 3
0

It's now fixed with the latest patch on BumbleBee. Check this blog post.

Amir_P
  • 8,322
  • 5
  • 43
  • 92