Flutter编译问题记录

问题:

运行出现以下报错

Launching lib/main.dart on macOS in debug mode... Warning: CocoaPods not installed. Skipping pod install. CocoaPods is a package manager for iOS or macOS platform code. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see Using packages | Flutter For installation instructions, see CocoaPods Guides - Getting Started Error: CocoaPods not installed or not in valid state.

提示:应该是CocoaPods安装有问题

步骤:

1.先卸载所有的CocoaPods

(1)查看 gem list cocoapods 或者

复制代码
gem list | grep cocoapods

或者which -a pod

或者

(2)卸载方式

brew uninstall cocoapods

或者

sudo gem uninstall cocoapods

或者

sudo rm -rf /usr/local/opt/ruby/bin/pod

或者

sudo rm -rf /usr/local/bin/pod

直到 which -a pod 为空

2.安装

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

pod setup

pod --version

相关推荐
Bryce李小白2 天前
Flutter 自定义 View 权威指引
flutter
恋猫de小郭2 天前
Fluttercon EU 2025 :Let‘s go far with Flutter
android·开发语言·flutter·ios·golang
SoaringHeart3 天前
Flutter进阶:自定义一个 json 转 model 工具
前端·flutter·dart
许泽宇的技术分享3 天前
Flutter + Ollama:开启本地AI的全平台新纪元 —— 从零剖析一款现代化AI客户端的技术奥秘
人工智能·flutter
molihuan3 天前
开源 全平台 哔哩哔哩缓存视频合并 Github地址:https://github.com/molihuan/hlbmerge_flutter
android·flutter·缓存·ffmpeg·开源·github·音视频
dora4 天前
Flutter中dart和原生代码的通信之MethodChannel
android·flutter
brave7235 天前
Riverpod 3.0.0 版本中 Provider 类型选择指南
flutter
ZFJ_张福杰5 天前
【区块链】Fiat24 深度解读(含 Flutter 集成与 SDK 骨架)
flutter·web3·区块链·钱包
古希腊被code拿捏的神5 天前
【Flutter】抽象类的运用(abstract与implements的实践)
flutter
ZFJ_张福杰5 天前
【Flutter】GetX最佳实践与避坑指南
android·flutter·ios·getx