Shimron Alakkal
Shimron Alakkal

Reputation: 145

VS code not able to detect or run flutter

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

Answers (5)

Francisco Oliveira
Francisco Oliveira

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

Though you installed and flutter doctor worked well you need to install the extensions in order to work with flutter in VS code environment.

  • install Flutter + Dart extensions from the extension tab

Upvotes: 0

Briaulin Mendez Sena
Briaulin Mendez Sena

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:

enter image description here

In my case it was to add the /bin folder in the path.

I hope this helps

Upvotes: 4

Dammy Richie
Dammy Richie

Reputation: 71

Uninstall and reinstall Dart Flutter Extension sir

Upvotes: 7

Mahmoud
Mahmoud

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

Related Questions