修改完后有下面警告
Warning! The 'flutter' tool you are currently running is from a different Flutter repository than the one last used by this package. The repository from which the 'flutter' tool is currently executing will be used instead.
This can happen when you have multiple copies of flutter installed. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path).
-----------------------------------------------------------------------------------------
flutter packages upgrade 更新一下即可
注意更新前需要先确认 flutter 调用的path,配置的path,为新的path 的正确性,
可以通过flutter --version 查看当前使用的path,如果不正确可以检查下环境变量,如果还是不正确,可以尝试重启ide或者电脑。
本文介绍了一种常见的Flutter开发中遇到的问题:当使用不同Flutter仓库时出现的警告信息。文章详细解释了如何通过检查和更新系统路径来解决此问题,确保开发环境中Flutter版本的一致性和正确性。

3万+

被折叠的 条评论
为什么被折叠?



