命令行中flutter doctor正常,pubspec.yaml中flutter doctor则报cocoapods not install(编译报)

(ios 编译报错 CocoaPods not installed or not in valid state)
原因是mac中安装了多个cococapod

解决方法:

  1. gem list 可以查看电脑中的cococapod版本

  2. sudo gem uninstall cocoapods后选择要卸载的版本

  3. sudo gem install cocoapods

  4. 如果卸载了所有的cocoapods,则执行附加步骤

  5. 转到Flutter项目的iOS目录

  6. pod install

  7. 重启软件就好了

猜你喜欢

转载自blog.csdn.net/qq_42944436/article/details/109022514