无法从 android 工作室更新 flutter 终端中的 CocoaPods

can't update CocoaPods in flutter terminal from android studio

这是完整的错误信息

Warning: CocoaPods minimum required version 1.9.0 or greater 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 upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state.
Error launching application on iPhone 13.

我可以直接从 Android studio 终端更新 CocoaPods 的命令吗?

尝试用这个命令安装

brew link --overwrite cocoapods

尽量不用家酿

1 - sudo gem uninstall cocoapods

2 - sudo gem install -n /usr/local/bin

3 - cocoapods pod install

终于在我辛苦了一整天之后。 我们无法将 CocoaPods 从非常旧的版本更新到新版本。 1 - sudo gem 卸载 cocoapods 2-sudo gem 安装 cocoapods:1.10.2