flutter 版本升级 记录

20 篇文章 0 订阅
2 篇文章 0 订阅
// 更新前 原版本 信息
Flutter 1.17.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8af6b2f038 (8 months ago) • 2020-06-30 12:53:55 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4


执行版本更新
一、flutter upgrade v1.22.6

出现
Your flutter checkout has local changes that would be erased by upgrading. If you want to keep these changes, it is recommended that you stash them via "git stash" or else commit the
changes to a local branch. If it is okay to remove local changes, then re-run this command with --force.

解决:百度方案(我实际操作是 不还原 flutter.gradle文件 不能正常切换 channel)没有解决问题

1、运行  flutter channel  查看当前SDK分支

2、运行flutter channel dev可以切换至开发版

3、再运行flutter upgrade或者flutter upgrade --force即可进行更新(加上--force 强制更新)



二、flutter upgrade v1.22.6 --force
出现问题
git: error: Your local changes to the following files would be overwritten by checkout:
git:    packages/flutter_tools/gradle/flutter.gradle
git: Please commit your changes or stash them before you switch branches.
git: Aborting
Switching channels failed with error code 1.

还原 flutter.gradle 文件 ,还原配置文件后 可以 直接在当前 channel 执行 flutter upgrade v1.22.6 命令进行升级

三、 flutter channel dev
git: fatal: unable to access 'https://github.com/flutter/flutter.git/': Failed to connect to github.com port 443: Operation timed out
Switching channels failed with error code 128.


四、查看git全局配置 git config --global -l


五、flutter channel dev
git: fatal: unable to access 'https://github.com/flutter/flutter.git/': Failed to connect to 127.0.0.1 port 1080: Connection refused
Switching channels failed with error code 128.

查询是否使用了代理:git config --global http.proxy
取消代理:git config --global --unset http.proxy
设置代理
git config --global https.proxy http://127.0.0.1:1080 && git config --global https.proxy https://127.0.0.1:1080
取消代理
git config --global --unset http.proxy && git config --global --unset https.proxy



六、flutter upgrade v1.22.6

 flutter version
1.27.0-4.0.pre
1.26.0-17.6.pre
1.26.0-17.5.pre
1.26.0-17.4.pre
1.27.0-1.0.pre
1.26.0-17.3.pre
1.26.0-17.2.pre
1.26.0-17.1.pre
1.26.0-17.0.pre
1.22.6
1.25.0-8.3.pre
1.26.0-12.0.pre
1.26.0-8.0.pre
1.25.0-8.2.pre
1.25.0-8.1.pre
1.26.0-1.0.pre
1.22.5
1.25.0-8.0.pre
1.25.0-4.0.pre
1.24.0-10.2.pre
1.24.0-10.1.pre
1.22.4
1.24.0-7.0.pre
1.22.3
1.24.0-6.0.pre
1.24.0-3.0.pre
1.22.2
1.23.0-18.1.pre
1.24.0-1.0.pre
1.23.0-18.0.pre
1.22.1
1.22.0-12.4.pre
1.23.0-13.0.pre
1.22.0-12.3.pre
1.22.0
1.22.0-12.2.pre
1.23.0-7.0.pre
1.23.0-4.0.pre
1.23.0-3.0.pre
1.22.0-12.1.pre
1.20.4
1.22.0-12.0.pre
1.20.3
1.22.0-9.0.pre
1.21.0-9.2.pre
1.22.0-1.0.pre
1.21.0-9.1.pre
1.20.2
1.21.0-9.0.pre
1.20.1
1.20.0
1.21.0-7.0.pre
1.20.0-7.4.pre
1.20.0-7.3.pre
1.21.0-5.0.pre
1.20.0-7.2.pre
1.21.0-1.0.pre
1.20.0-7.1.pre
1.20.0-7.0.pre
1.20.0-3.0.pre
1.19.0-4.3.pre
1.17.5
1.20.0-2.0.pre
1.19.0-4.2.pre
1.20.0-1.0.pre
1.17.4
1.19.0-4.1.pre
1.20.0-0.0.pre
1.19.0-5.0.pre
1.19.0-4.0.pre
1.17.3
1.19.0-3.0.pre
1.19.0-2.0.pre
1.17.2
1.18.0-11.1.pre
1.17.1
1.19.0-1.0.pre
1.19.0-0.0.pre
1.18.0-13.0.pre
1.18.0-12.0.pre
1.18.0-11.0.pre
1.18.0-9.0.pre
1.18.0-10.0.pre
1.17.0-3.4.pre
1.17.0
1.17.0-3.3.pre
1.18.0-8.0.pre
1.18.0-7.0.pre
1.17.0-3.2.pre
1.18.0-6.0.pre
1.18.0-dev.5.0
1.18.0-dev.4.0
1.18.0-dev.3.0
1.17.0-dev.3.1
1.18.0-dev.2.0
1.18.0-dev.1.0
1.18.0-dev.0.0
1.17.0-dev.5.0
1.17.0-dev.4.0
1.17.0-dev.3.0
1.17.0-dev.2.0
1.17.0-dev.1.0
1.17.0-dev.0.0
v1.12.13+hotfix.9
v1.16.3
v1.16.2
v1.16.1
v1.16.0
v1.15.22
v1.15.21
v1.15.20
v1.15.19
flutter-0.0-candidate.1
v1.15.18
v1.15.17
v1.15.16
v1.15.15
v1.15.14
v1.15.13
v1.15.12
v1.15.11
v1.15.10
v1.15.9
v1.15.8
v1.15.7
v1.15.6
v1.15.5
v1.15.4
v1.12.13+hotfix.8
v1.15.3
v1.15.2
v1.15.1
v1.15.0
v1.14.6
v1.12.13+hotfix.7
v1.14.5
v1.14.4
v1.14.3
v1.14.2
v1.14.1
v1.14.0
v1.13.9
v1.13.8
v1.13.7
v1.13.6
v1.13.5
v1.13.4
v1.13.3
v1.13.2
v1.12.13+hotfix.6
v1.12.13+hotfix.5
v1.13.1
v1.12.13+hotfix.4
v1.12.13+hotfix.3
v1.12.13+hotfix.2
v1.13.0
v1.12.13+hotfix.1
v1.12.16
v1.12.15
v1.12.14
v1.12.13
v1.12.12
v1.12.11
v1.12.10
v1.12.9
v1.12.8
v1.12.7
v1.12.6
v1.12.5
v1.12.4
v1.12.3
v1.12.2
v1.12.1
v1.12.0
v1.11.0
v1.10.16
v1.10.15
v1.9.1+hotfix.6
v1.9.1+hotfix.5
v1.10.14
v1.10.13
v1.10.12
v1.10.11
v1.10.10
v1.10.9
v1.10.8
v1.10.7
v1.9.1+hotfix.4
v1.9.1+hotfix.3
v1.10.6
v1.10.5
v1.10.4
v1.10.3
v1.10.2
v1.9.1+hotfix.2
v1.10.1
v1.10.0
v1.9.1+hotfix.1
v1.9.7
v1.9.6
v1.9.5
v1.9.4
v1.9.3
v1.9.2
v1.9.1
v1.9.0
v1.8.4
v1.8.3
v1.7.8+hotfix.4
v1.8.2
v1.7.8+hotfix.3
v1.8.1
v1.7.8+hotfix.2
v1.7.8+hotfix.1
v1.8.0
v1.7.11
v1.7.10
v1.7.9
v1.7.8
v1.7.7
v1.7.6
v1.7.5
v1.7.4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0.2.7
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.9
v0.1.8
v0.1.7
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
v0.0.24
v0.0.23
v0.0.22
v0.0.21
0.0.21
v0.0.20
0.0.20
v0.0.19
0.0.19
v0.0.18
0.0.18
v0.0.17
0.0.17
v0.0.16
0.0.16
v0.0.15
0.0.15
v0.0.14
0.0.14
v0.0.13
0.0.13
v0.0.12
0.0.12
v0.0.11
0.0.11
v0.0.10
0.0.10
v0.0.9
0.0.9
v0.0.8
0.0.8
v0.0.7
0.0.7
v0.0.6
0.0.6
v0.0.20-alpha

2021-02-22日
一、 flutter upgrade v1.22.6 --force
Your flutter checkout has local changes that would be erased by upgrading. If you want to keep these changes, it is recommended that you stash them via "git stash" or else commit the
changes to a local branch. If it is okay to remove local changes, then re-run this command with --force.

二、恢复 Flutter SDK 中 flutter.gradle 配置文件的修改 ,然后重新执行 flutter upgrade v1.22.6 --force

 

注意:升级完后 我的Android 环境可以直接使用,iOS 环境提示pod 过时,需要删除Podfile 文件重新生成 ,再运行 flutter build ios。(这个过程比较慢,我大概执行了一个多小时)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值