I’m trying to install Flutter using VS code and it shows this error:
What happened:
Firstly, I had Flutter installed and worked fine. All projects build fine, and everything is going well. I tried to install Firebase then Fluuterfire it made some errors, then I cancelled it. I returned to my projects on VS code it had errors building. I tried to uninstall Flutter and reinstall it, I uninstalled but couldn’t reinstall due to these errors.
I tried to uninstall Flutter extension, Dart Extension, VS code, Git, and delete Flutter SDK files and that doesn’t work.
I think some file of Types may be missing, here is a list of environment variables if it can help:
2
Answers
I found the problem was in the packages installed by pub.dev.
1- I deleted the cache folder which is located in
C:Users<user name>AppDataLocalPub
2- Deleted flutter SDK folder
3- restarted my PC
4- run PowerShell
<your project path> flutter clean
5- run
flutter run
6- worked!
Note: before I do this, even
flutter
command orflutter doctor
was taking time and not responding.remove old sdk environment restart your pc and try again if it now work try this
Flutter SDK windows upgrade – Access denied, Cookies not found
I think this one is relate to your issue