Search code examples
androidandroid-studiosyntax-highlighting

Android Studio Java Syntax Highlighting Not Working


In Android Studio (Version 1.1.0) I'm having issues getting it to highlight .java syntax properly. It is currently only highlighting Keywords, commas, semicolons, and comments. Other file types such as .xml are highlighted properly.

I've tried the following things...

  1. Reinstalling Android Studio Removing any personal settings
  2. In Settings -> Editor Changed the colors to anything to see if it worked, under General and Java
  3. File -> Invalidate Caches
  4. Under File Types I've declared my file as a Java source file.
  5. Made sure Power Save Mode was turned OFF.

Solution

  • The .java file was located in the root directory. I moved the file to the directory src/main/java/org.we/ and the syntax started working.