pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...
Could not resolve URL "https://pub.flutter-io.cn".
pub get failed (server unavailable) -- attempting retry 3 in 4 seconds...
Could not resolve URL "https://pub.flutter-io.cn".
pub get failed (server unavailable) -- attempting retry 4 in 8 seconds...
Could not resolve URL "https://pub.flutter-io.cn".
pub get failed (server unavailable) -- attempting retry 5 in 16 seconds...
Could not resolve URL "https://pub.flutter-io.cn".
pub get failed (server unavailable) -- attempting retry 6 in 32 seconds...
Could not resolve URL "https://pub.flutter-io.cn".
pub get failed (server unavailable) -- attempting retry 7 in 64 seconds...
去flutter目录找到隐藏文件夹 .pub-cache 把缓存删了就可以了
命令行:
flutter pub cache clean
文章描述了在执行Flutter项目时遇到pub.get失败,服务器不可用的问题。尝试多次重试后仍无法解析URLhttps://pub.flutter-io.cn。解决方案是进入Flutter目录删除.pub-cache的缓存,可以通过运行flutterpubcacheclean命令来清理。
1076

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



