Syntax error highlighting isn't working for a single file in my project. I've tried:
- Restart Android Studio
- Restart Computer
- Invalidate Caches and Restart
- Clean and Rebuild Project
- Sync Project with Gradle Files
- Make sure I am not in Power Save Mode
- Run Analyze -> Inspect Code on the file in question (no errors found)
I don't see any plugin errors when starting up Android Studio
If I make a syntax error in any other file, the offending piece of code is underlined immediately in red. When I build, the build fails because of the syntax errors.
Android Studio Info:
Android Studio 4.1.2
Build #AI-201.8743.12.41.7042882, built on December 19, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1246M
Cores: 4
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true
Non-Bundled Plugins: com.thoughtworks.gauge, org.intellij.plugins.markdown, com.intellij.marketplace, org.jetbrains.kotlin
Reported as a bug here: https://issuetracker.google.com/issues/181717941
This is fixed by File -> Manage IDE Settings -> Restore Default Settings