I updated my flutter version by flutter upgrade --force
command and now my project doesn't compile
is there is a way to downgrade to old version (i dont know my old version number)
please help me because this is my graduation project
I updated my flutter version by flutter upgrade --force
command and now my project doesn't compile
is there is a way to downgrade to old version (i dont know my old version number)
please help me because this is my graduation project
If you're seeing the message:
There is no previously recorded version for channel "stable".
Navigate to your Flutter installation folder and run git checkout flutter_version
If you're using snap on Linux and want to downgrade to 1.22.6:
cd $HOME/$USER/snap/flutter/common/flutter
git checkout 1.22.6
flutter --version
For change the Flutter sdk version use this command: For upgrade the latest version:
flutter upgrade 1.20.0 //version number
For decrease the Flutter sdk version:
flutter downgrade 1.18.0 // version number
And for check the version which you Currently used:
flutter --version
You need go to flutter sdk folder and run git command checkout your version
get flutter sdk path on android studio:
File -> Settings -> Languages & Frameworks -> Flutter -> FLutter SDK path
Change flutter channel if you want
flutter channel <branch> (example: flutter channel dev or flutter channel stable)
Change Flutter version:
git checkout <version> (example: git checkout 2.0.3)
after: flutter doctor -v
hope to help some body
Changing the Flutter version is like changing git branch.
if you want to change the channel use
flutter channel <branch> (example: flutter channel dev or flutter channel stable)
There are four flutter Channels
1). stable 2). dev 3). beta 4). master
You can further study about these channels from here
flutter downgrade <version>
You can see versions from here
After completion, run flutter doctor, and Flutter will take care of downloading/compiling everything required to run this version.
This is the best method to switch flutter versions
Check the Flutter versions that you want and in what Channel from here https://docs.flutter.dev/development/tools/sdk/releases?tab=macos
on your terminal just type 1- switch to the channel that contains your version
flutter channel stable
2- downgrade using this
flutter downgrade v2.10.5
This is working for me every time
flutter version
is now deprecated. flutter downgrade <version-no>
will do the trick ! After this run flutter doctor
. It will take care of the rest.
Simple question,
1- you have to access the directory where your flutter is installed by terminal.
ex: cd C:\src\flutter
2 - then, you write the command git checkout (number of version).
3 - flutter --version.
It's similar with the guy above, but the difference is that i was trying to install downloading the file on the link for sdk installations, but it didn't work. So, i followed these steps and it works for me.
What worked for me was downloading the version directly from Flutter SDK's website and replacing the old flutter folder from /Users/NAME/flutter/ with it.