question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax highlighting not working with new dart files in Android Studio

See original GitHub issue

Hi,

I recently updated to Android Studio 3.6 running on Linux. After the updated, I started up Android Studio to work on my flutter project and I was asked to update the Dart & Flutter plugins for Android Studio so I did just that. After completing the updates I tried to continue working on my project but now I’m having an issue with new dart files when I make them.

The syntax highlighting is not working at all with the new dart files as seen in the first photo.Screenshot_20200226_140236

In the second one, it seems the syntax highlighting is only working with return types, method types and classes Screenshot_20200226_141235

Iv tried disabling the plugins, restart the IDE and then enabling them again with zero luck. I have also disabled my theme plugin in case maybe that is what was causing it but it doesn’t seem to be.

Here is my flutter doctor -v report

[✓] Flutter (Channel dev, v1.15.3, on Linux, locale en_IE.UTF-8) • Flutter version 1.15.3 at /home/cathal/Development/flutter • Framework revision 67826bdce5 (2 weeks ago), 2020-02-10 14:59:32 -0800 • Engine revision 6158f03ef5 • Dart version 2.8.0 (build 2.8.0-dev.8.0 514a8d4c84)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /home/cathal/Android/Sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • ANDROID_HOME = /home/cathal/Android/Sdk • Java binary at: /opt/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find chrome executable at google-chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 3.6) • Android Studio at /opt/android-studio • Flutter plugin version 43.0.2 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.3) • IntelliJ at /opt/intellij-idea-ultimate-edition • Flutter plugin version 43.0.3 • Dart plugin version 193.6494.35

[✓] Connected device (1 available) • Web Server • web-server • web-javascript • Flutter Tools

! Doctor found issues in 1 category.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
yvonmanzicommented, Jun 24, 2020

@CathalButler Thanks for your suggestions. I realized that after upgrading my Android Studio, Flutter and Dart plugins were disabled waiting to either be upgraded to be kept with their current versions. Making sure they were all enabled once again helped.

0reactions
Solexplorercommented, Oct 5, 2020

I faced the same issue, what I’ve done to overcome it was to copy an existing dart file and rename it. I followed all the suggestion from the guy above tho

Read more comments on GitHub >

github_iconTop Results From Across the Web

Syntax highlighting not working with new dart files in Android ...
Hi,. I recently updated to Android Studio 3.6 running on Linux. After the updated, I started up Android Studio to work on my...
Read more >
Dart syntax highlighting may become incorrect after save.
The syntax highlighting in the editor is broken. It happens directly after making a change or saving a file, but not each single...
Read more >
Awalys show "Syntax highlighting has been temporarily ...
Every time I write code, I will prompt this error after a while, and then the smart prompt and syntax highlighting are turned...
Read more >
10 Best Visual Studio Code Extensions for Flutter Development
Pubspec Assist; Error Lens; Flutter Tree; Bracket Pain Colorizer 2; Dart Data Class Generator; Flutter Stylizer; Better Comments; Color ...
Read more >
Set up an editor - Flutter documentation
Set up an editor · Install VS Code · Install the Flutter and Dart plugins · Validate your setup with the Flutter Doctor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found