2 days ago, I upgraded Flutter and since then, dart has basically stopped working in VS Code. By that, I mean that VS Code does not identify any error in Flutter app. No Coding error and no package error. Nothing happens if I press Cmd Enter
Whenever I start VS Code, I get the same errors and these errors are: 1: The Dart Analysis Server server crashed 5 times in the last 3 minutes. The server will not be restarted.
The Dart Analysis Server server crashed 5 times in the last 3 minutes. The server will not be restarted.
2: Dart DevTools exited with code 255. Would you like to try reactivating DevTools?
3: The Dart Analyzer has terminated.
So far, I have tried numerous solutions which include downgrading flutter version to 2.8.1, 2.5.0. I have also tried running the command flutter pub global activate devtools -v 2.8.0
. I have even tried uninstalling vs code and installing it from scratch.
Is there any solution to this mess? Is there anyone else with this same issue recently? Thanks!!!
Flutter Version: 2.10.0 macOS Version: 11.4(Big Sur)
PS Seems to be a problem in VS Code only since it seems to be working fine in IntelliJ. Still, no solution though.
Ok, so, after searching long and hard for this. I cam across a similar question here on StackOverflow and the answer provided by the person who posted that question, worked for me too. I ran the following command:
sudo chown -R $(echo $USER):staff $(echo ~)
Whenever, I would try to run the command that started with 'dart', I would get a full stop( .
). And this question was exactly about that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.