You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter升级失败求助:仓库地址异常导致无法升级

修复Flutter升级时仓库地址异常的问题
  • 打开终端,导航到你的Flutter安装根目录(比如cd C:\src\flutter,根据实际安装路径调整)
  • 查看当前Git远程仓库配置,确认错误地址:
    git remote -v
    
  • 将远程仓库地址修改为Flutter官方仓库:
    git remote set-url origin https://github.com/flutter/flutter.git
    
    若上述命令无效,可先移除旧远程仓库再添加新的:
    git remote remove origin
    git remote add origin https://github.com/flutter/flutter.git
    
  • 执行拉取命令验证仓库连接正常:
    git fetch
    
  • 切换到稳定版通道(推荐):
    flutter channel stable
    
  • 执行升级命令:
    flutter upgrade
    
  • 最后再次检查Flutter环境:
    flutter doctor
    

内容的提问来源于stack exchange,提问作者Muhammad Faisal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.14 14:20:27