1

I am using Windows 10 and Visual Studio code for Flutter development. It was working fine till I upgraded the VS code to the latest version of Flutter. Now I am not able to do anything on VS code as the SDK selection for flutter always shows up and I am not able to select those enter image description here

I tried to uninstall and install VS Code as well as its extensions multiple times but no help. Another observation is that when I click Cntrl + Shift + P, I am now able to see SDK option which was coming previously. How can I select the Flutter SDK and avoid this issue PS :- I am able to run in Android Studio so no issue with the system only for the VSCode Flutter Extension

3 Answers 3

2

I have found the solution to the problem. I just deleted the C:\Users\<Username>\AppData\Roaming\Code\User folder. It seems likesome kind of caching has happened which was causing this issue. Post this it started working fine. Thank you for all the people who has responded

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

Comments

1

I think it's better to do this manually. I have solved this problem before as in the link

1 Comment

Thanks for the reply, my issue is not related to the upgrading/downgrading of flutter. It is on VS Code where the SDK is not getting selected. The dropdown will come to autodetect SDK or select from the path as shown below, however I am not able to select any value from dropdown and it wont allow any other button press as well since it expects this dropdown to be selected first
1

You can create .vscode folder if you don't have that kind of folder in your workspace.

Then you can create settings.json file and overwrite those paths to your json file.

{
   "dart.flutterSdkPath": "your_flutter_path",
   "dart.sdkPath": "your_dart_path"
}

3 Comments

Hello Nijat, Thanks for the reply. I have tried this method. I guess the latest version of the VSCode does not create this folder - .vscode. Anyways I created those manually and made the following entry
It didn't work?
{"dart.sdkPath": "E:\\software\\flutter\\bin\\cache\\dart-sdk\\", "dart.flutterSdkPath": "E:\\software\\flutter\\"} However it didn't help. At the bottom of VSCode I have see the Dart version selected. however it is like a javascript bug where the dropdown is always open. Is there any way I can clear all VS Code caches and reinstall. Even though I remove the installation folder, it has no impact. It is caches somewhere else because on reinstallation, I can still see the last projects worked on. If you know how to clear caches, please let me know

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.