欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 艺术 > 关于Flutter doctor里两个警告的消除

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

2024/10/24 5:22:56 来源:https://blog.csdn.net/some_man/article/details/139596022  浏览:    关键词:关于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. Consideradding /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是否消失

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com