Reputation: 145
I was doing a project using flutter in vs code and all of a sudden after a shutdown vs code is not This error shows up
The flutter doctor command shows no problem too. doctor summary
Upvotes: 5
Views: 19569
Reputation: 1
Normally this problem occurs because there is more than one reference in the vs-code path on your system, in an Ubuntu-type distro it may be that there is an installation of vs-code in snap and apt, a solution would be to check if there is an installation of vs-code in snap and remove it: sudo snap list code && sudo snap uninstall code
.
Upvotes: 0
Reputation: 161
Though you installed and flutter doctor worked well you need to install the extensions in order to work with flutter in VS code environment.
Upvotes: 0
Reputation: 146
It's a bit late to reply but if anyone runs into this problem this fixed it for me.
This happens because maybe VS Code can’t find Path to Flutter SDK.
You can set the path in the VS Code settings.json
file in dart.flutterSdkPath
:
In my case it was to add the /bin
folder in the path.
I hope this helps
Upvotes: 4
Reputation: 510
VS Code Can’t Find Path to Flutter SDK
1 - Check flutter and dart extension in VS Code
2 - Press Ctrl + shift + p
search for flutter SDK, select flutter change SDK, and select auto-detect
3 - Press Ctrl + shift + p
to search for flutter, then select flutter doctor from the list.
Upvotes: 0