randomUser786
randomUser786

Reputation: 1655

Dart Plugin for Android Studio not working on .dart file

Here is the issue, for all my other files the dart plugin works The dart plugin is not working for this file, it worked in the past, but for some reason, it stopped working today.

Upvotes: 4

Views: 1347

Answers (2)

griffins
griffins

Reputation: 8246

from this github issue there could be several sources of the error

TL:DR

Some things to look at:

  • analysis server: ensure the Dart analysis server is running, restart it to be sure
  • plugins: disable all plugins you installed except Dart and Flutter (remember to restart)
  • multiple installations: if you have more than one Flutter installed (I have many) delete all but one
  • dev channel: try switching to the stable Flutter channel check the IntelliJ log to see if exceptions are being thrown

It could be that something is causing the analysis server to shut down. That would explain having syntax highlighting when you start up but not when opening new files.

some users have reported that Material Theme could be causing the issue.

Upvotes: 0

Zodako
Zodako

Reputation: 41

The solution should be simple: Right click on the file and in the middle of the menu "Mark as dart file".

Upvotes: 1

Related Questions