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

相关推荐
君赏2 天前
棉宇宙 Flutter 热更新是如何落地的
flutter
恋猫de小郭2 天前
AndroidX 新增 Security State ,支持可编程的系统安全状态查询
android·前端·flutter
zihan5182 天前
自己做软件日记9/21 得到了一个良好的文件结构框架
后端·flutter·前端框架·android studio
ZFJ_张福杰3 天前
【Flutter】Flutter 中有哪些耗时操作?从 UI 卡顿到 Isolate 性能优化
flutter·性能优化·卡顿·isolate
sakiko_3 天前
Flutter:Dart学习笔记1:基础UI组件等
flutter
9765033353 天前
iOS 上架 4.3a 被拒【uniapp专讲】
flutter·ios·objective-c·uniapp·swift
传奇开心果编程3 天前
【Flutter入门练中学】第2课:布局系统
学习·flutter·ui
君赏3 天前
FlutterPatch:把 Shorebird 热更新的控制面搬回自己服务器
flutter
用户2181697049304 天前
Flutter tootip 轻量级提示
flutter
用户2181697049304 天前
Flutter 拖拽 Draggable DragTarget
flutter