Flutter initializaiton in VSCode

最后都变了- 提交于 2021-02-10 04:14:22

问题


I've been working on a flutter project using VS Code. And when I opened my project today, there is a notification stating "Initializing flutter. This may take a few minutes", and it's struck there.

Image showing the message

Also, all the commands such as "flutter run" and "flutter doctor" are perfectly running and I am able to run my app through the terminal. But the other options such as Run Without Debugging are not working, and also the code auto-complete is showing no suggestions. Can anyone please help me in solving the issue.


回答1:


First you should delete Flutter´s folder and then you must git clone -b master https://github.com/flutter/flutter.git. After you did it, Go to project or locate to your project in the terminal and enter first flutter channel, second flutter channel stable, last step flutter upgrade. (This is working for me on windows)

This page https://medium.com/@psyanite/get-started-with-flutter-on-windows-3d3fbb8b221a can help you with some steps if you need install something else.




回答2:


In the settings.json file check that "dart.flutterSdkPath" has the correct location of the Flutter SDK to use. Or leave it blank to look for it in the project directory, FLUTTER_ROOT environment variable, and PATH environment variable



来源:https://stackoverflow.com/questions/64181752/flutter-initializaiton-in-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!