作者:阿乀胜69 | 来源:互联网 | 2023-09-12 02:51
我的项目使用不向后兼容的包,
我厌倦了在新 PC 上安装,但它安装了最新的 Flutter 并且我无法降级 Flutter
$ flutter downgrade v1.22.6
Downloading Dart SDK from Flutter engine a252ec09b74cca0f8d8d3450566bf77c77f81e8d...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 199M 100 199M 0 0 1159k 0 0:02:55 0:02:55 --:--:-- 2695k
Building flutter tool...
Downloading Material fonts... 1,453ms
Downloading Gradle Wrapper... 242ms
Downloading package sky_engine... 914ms
Downloading flutter_patched_sdk tools... 4.8s
Downloading flutter_patched_sdk_product tools... 3.9s
Downloading linux-x64 tools... 7.3s
Downloading linux-x64/font-subset tools... 874ms
There is no previously recorded version for channel "dev".
我试着stable
和beta
以及
$ flutter downgrade v1.22.6
There is no previously recorded version for channel "stable".
flutter downgrade 1.22.6
There is no previously recorded version for channel "beta".
我也试过:
$ flutter version v1.22.6
WARNING: Flutter version command has been removed, using latest from channel
回答
cd 到 flutter 目录,例如 /home/elia/snap/flutter/common/flutter
然后做:
git checkout 1.22.6
回答
你可以从Flutter SDK 发布页面下载你想要的版本,然后在你的机器上安装它作为你的 Flutter SDK。