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

相关推荐
火柴就是我1 天前
flutter 之真手势冲突处理
android·flutter
Speed1231 天前
`mockito` 的核心“打桩”规则
flutter·dart
法的空间1 天前
Flutter JsonToDart 支持 JsonSchema
android·flutter·ios
恋猫de小郭1 天前
Android 将强制应用使用主题图标,你怎么看?
android·前端·flutter
玲珑Felone1 天前
从flutter源码看其渲染机制
android·flutter
ALLIN2 天前
Flutter 三种方式实现页面切换后保持原页面状态
flutter
Dabei2 天前
Flutter 国际化
flutter
Dabei2 天前
Flutter MQTT 通信文档
flutter
Dabei2 天前
Flutter 中实现 TCP 通信
flutter
孤鸿玉2 天前
ios flutter_echarts 不在当前屏幕 白屏修复
flutter