Dart Analyzer terminated on flutter clean or flutter run

1k views Asked by At

Whenever I use the command flutter clean or flutter run, the window "The Dart Analyzer has terminated." pops up in VS Code. For flutter run I can specify that the analyzer terminates when it says "Running Gradle task 'assembleDebug'" in the console.

Here is the log after running flutter clean: https://hastebin.com/osovilenaj.swift

Can someone tell me the reason for this behaviour? I can simply click on restart, but it is annoying during my workflow.

2

There are 2 answers

0
PlutoHDDev On BEST ANSWER

Since something (Dart?) has been updated the error does not occurre anymore.

12
Akshit Ostwal On

Try to update and restart both PC and VSCode, see if the problem persist.

It generally used to happen to me when either my CPU is doing too much work or the RAM is exhausted, see if you have same problem either with CPU or RAM use a real device to test with USB Debugging enabled instead of Emulator.

also this might also help VSCode dart analyzer stopped recognizing flutter/dart code