首页 > 解决方案 > CocoaPods 未安装或未处于有效状态

问题描述

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.

标签: iosflutterdart

解决方案


这通常是由于 Visual Studio 或 IntelliJ 无法找到路径或关联的插件或扩展而发生的。

这是解决方案:

  1. sudo gem 卸载 cocoapods && sudo gem 安装 cocoapods
  2. 重新启动 IDE 或编辑器

如果不完全关闭项目,最后一步应该可以解决问题


推荐阅读