关于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是否消失

相关推荐
早起的年轻人2 小时前
Flutter String 按 ,。分割
flutter
helloxmg12 小时前
鸿蒙harmonyos next flutter通信之MethodChannel获取设备信息
flutter
helloxmg12 小时前
鸿蒙harmonyos next flutter混合开发之开发package
flutter·华为·harmonyos
lqj_本人1 天前
flutter_鸿蒙next_Dart基础②List
flutter
lqj_本人2 天前
flutter_鸿蒙next_Dart基础①字符串
flutter
The_tuber_sadness2 天前
【Flutter】- 基础语法
flutter
helloxmg2 天前
鸿蒙harmonyos next flutter通信之BasicMessageChannel获取app版本号
flutter
linpengteng2 天前
使用 Flutter 开发数字钱包应用(Dompet App)
前端·flutter·firebase