关于Flutter doctor里两个警告的消除

在终端里输入 flutter doctor 是我们检查flutter是否配置好的方法。

在输出信息里常碰到两个警告

复制代码
! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/2.18.6/libexec/bin/dart,
      which is not inside your current Flutter SDK checkout at /Users/dengpeng/flutter. Consider
      adding /Users/xxxx/flutter/bin to the front of your path.

意思就是检测到了单独的 dart SDK

这里我用brew list 查看了自己安装列表

果然有,我们只要输入brew remove dart 删除此处的dart 即可消除这个Warning

还有一个

复制代码
! CocoaPods 1.10.1 out of date (1.11.0 is recommended).
        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

说的是CocoaPods 版本已过时,让我们升级CocoaPods 版本

我们只要在终端输入

复制代码
 gem install cocoapods

如果没权限输入

复制代码
sudo gem install cocoapods

完成后就更新到最新版本

最后输入flutter doctor -v 查看Warning是否消失

相关推荐
RaidenLiu16 小时前
从 Provider 迈向 Riverpod 3:核心架构与迁移指南
前端·flutter
叽哥17 小时前
Flutter面试:Dart基础2
flutter·面试·dart
tangweiguo0305198720 小时前
Android原生(Kotlin)与Flutter混合开发 - 设备控制与状态同步解决方案
android·flutter
江上清风山间明月2 天前
Flutter AlwaysScrollableScrollPhysics详解
flutter·滚动·scrollable·scrollphysics
普罗米拉稀2 天前
Flutter 复用艺术:Mixin 与 Abstract 的架构哲学与线性化解密
flutter·ios·面试
yangshuo12812 天前
AI编程工具对决:Kilo vs Augment 开发Flutter俄罗斯方块游戏实战对比
flutter·游戏·ai编程
tangweiguo030519872 天前
Flutter 自定义 Switch 切换组件完全指南
flutter
笔沫拾光2 天前
iOS 正式包签名指南
flutter·ios·ios签名
森之鸟3 天前
flutter项目适配鸿蒙
flutter·华为·harmonyos
傅里叶3 天前
Flutter在OrangePi 5 Plus上视频播放锁死问题
前端·flutter