13

I got the following error when trying to switch to an older version (1.17.4) from my current version (Flutter 1.20.1 • channel stable).

> flutter downgrade
There is no previously recorded version for channel "stable".
Channel "beta" was previously on: 1.17.0-dev.3.1

flutter downgrade is the recommended way for switching versions instead of the deprecated flutter version command. However, there's no documentation I may refer to how it is used.

5 Answers 5

13

Another approach to downgrading is to change to the flutter-sdk directory and using git you can checkout a particular tag.

List the available tags with:

git tag

Then switch to a particular one with (e.g.):

git checkout 1.24.0-10.2.pre

(as I had to do today).

Note that this will switch which channel you are on and lock you at that version until you switch back with something like flutter channel dev once you believe the issue you faced is resolved.

Sign up to request clarification or add additional context in comments.

Comments

10

in my case , I switched flutter channel master then flutter downgrade v1.22.6 it work

or

by using git find available flutter version list using git tag

for downgrade any version use :

git checkout 1.24.0-10.2.pre(any version name)

Comments

8

Check your flutter channel:

flutter channel

Show like this:

Flutter channels:
   master
   dev
   beta
 * stable

Change to master:

flutter channel master

Run command:

flutter downgrade v1.22.6

Comments

6

flutter downgrade only works if you have a previous version of flutter installed from the same channel. It seems like you don't, so please use flutter version v1.17.4.

Find a list of flutter versions here: https://flutter.dev/docs/development/tools/sdk/releases

1 Comment

It's flutter downgrade not flutter-downgrade now
1

if you want to keep both versions just download a zip of old version and put in the same folder where is a new version and change its name or you can change flutter path

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.