Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

flutter downgrade error - There is no previously recorded version for channel

Tags:

flutter

My project uses packages that are not backward compatible,

I tired to install on a new PC but it install the latest flutter and I cannot downgrade 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".

I tried on stable and beta as well

$ 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".

I also tried:

$ flutter version v1.22.6
WARNING: Flutter version command has been removed, using latest from channel
like image 481
Elia Weiss Avatar asked Mar 09 '21 10:03

Elia Weiss


People also ask

How do I downgrade my flutter channel?

To Downgrade Flutter SDK First of all Open your Terminal. Then type flutter version It will return all flutter version list. Choose the version that you want to downgrade. Just run the flutter version Suppose I want to use flutter version v1.

Can I downgrade flutter version?

Upgrade/Downgrade by Changing Flutter Channel Each version can have different versions. For example, the stable channel uses the latest stable version, while the beta channel uses a pre-release version. To change the channel, you can use flutter channel {channelName} command.


5 Answers

cd to flutter directory, e.g. /home/elia/snap/flutter/common/flutter

then do:

git checkout 1.22.6

like image 103
Elia Weiss Avatar answered Oct 20 '22 02:10

Elia Weiss


  1. open flutter SDK directory on terminal, and type git checkout <sdk-version> e.g git checkout 2.5.0. just make sure the version you are asking for, is correct as in the sdk documentation (https://docs.flutter.dev/development/tools/sdk/releases).
  2. Type flutter --version. if terminal dispaying something like Downloading Dart SDK from Flutter engine . . . means you just have to wait for the download update to finish.
  3. when download has finish, type again flutter --version to make sure that the sdk has changed.
  4. finish.
like image 41
Denis Ramdan Avatar answered Oct 20 '22 01:10

Denis Ramdan


You can download the version you want from the Flutter SDK release page then install it as your Flutter SDK on your machine.enter image description here

like image 7
Guillaume Roux Avatar answered Oct 20 '22 03:10

Guillaume Roux


Download the version you want from the Flutter sdk release page and select that SDK path in Settings> Language and Framework > Flutter .

If it throws the error " the flutter sdk is incomplete.." Simply navigate to where you downloaded the SDK then Flutter> Bin> Flutter.bat

This will download the remaining files for the sdk. You can then select the sdk path without error

SDK Release page

like image 1
KevinSom98 Avatar answered Oct 20 '22 01:10

KevinSom98


Go to your flutter install folder. If you do not know installation path, use this command:

flutter sdk-path

Then use git to downgrade

git checkout <VERSION>
flutter --version

This will download the specified version and downgrade flutter.

like image 1
Varun Kumar Avatar answered Oct 20 '22 02:10

Varun Kumar