skip to Main Content

I’m trying to install Flutter using VS code and it shows this error:

error installing flutter

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:

environment variables

2

Answers


  1. Chosen as BEST ANSWER

    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 or flutter doctor was taking time and not responding.


  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search