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.
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.
in my case , I switched flutter channel master
then flutter downgrade v1.22.6
it work
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
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With