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

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一行注释也不写

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值