Flutter运行报错:系统找不到指定的路径

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
/F:/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:9:8: Error: Error when reading ‘/C:/Users/用户名/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/vector_math-2.1.4/lib/vector_math_64.dart’: 系统找不到指定的路径�?

原因:可能是清空垃圾或者缓存,或者修改了AppData的路径。

解决方案:

# 清空之前的缓存,然后重新get一下
flutter clean
flutter pub get
#也可以更新一下flutter到最新版
flutter upgrade
# 确保你的Flutter配置正确设置了下载源
flutter config

你可能感兴趣的:(flutter,flutter)