6

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

2
  • you can try fvm.app. This will help you in the long run. Commented Nov 4, 2021 at 6:10
  • Try installing the Flutter plugin again in VSCode. It may be corrupted. File -> Preferences -> Extensions Commented Nov 4, 2021 at 6:18

6 Answers 6

11

Uninstall and reinstall Dart Flutter Extension sir

Sign up to request clarification or add additional context in comments.

Comments

4

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

Comments

0

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.

Comments

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

Comments

0

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.

Comments

0

I had the issue where flutter doctor reported "VS Code (version unknown)" and failed to detect the VS Code version on Ubuntu.

The problem was that Flutter expected to find VS Code’s version info inside /usr/share/code/Resources/app/package.json, but on Ubuntu, the actual folder was /usr/share/code/resources (lowercase 'r'). This mismatch caused Flutter not to detect the VS Code version correctly.

What I did to fix it:

I created a symbolic link named Resources that points to the existing resources directory by running this command in the terminal: sudo ln -s /usr/share/code/resources /usr/share/code/Resources This command creates a shortcut named Resources pointing to the correct resources folder, effectively satisfying Flutter’s expected path.

To verify the symbolic link was created correctly, I ran: ls -l /usr/share/code

And got this output showing the symlink: lrwxrwxrwx 1 root root 25 Sep 5 23:06 Resources -> /usr/share/code/resources

I also confirmed the link target with: /usr/share/code/resources

finally i run fluter doctor -v

[✓] VS Code (version 1.103.2) [36ms]
    • VS Code at /usr/share/code
    • Flutter extension version 3.118.0

1 Comment

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.