I just installed and re-installed IntelliJ. Every Java file is coming up RED. I checked the JDK; it is at 1.6.##. The maven clean install
build worked just fine
I could not get any of these solutions to work for me. I had to manually go to every method/class that I got the error on and import it manually. After that everything was fine.
I have IntelliJ IDEA 12.x on the Mac and I use Maven 3 and I get the red highlighting over my code even though the Maven build is fine. None of the above (re-indexing, force import, etc.) worked for me. I had to do the following:
Intellij -> Preferences -> Maven -> Importing
[ ] Use Maven3 to import projects
I have to check the Maven3 import option and that fixes the issue.
Yet another solution on IntelliJ Ultimate 2018.2
Resolved by simply "Refresh All Gradle Projects"
I had the same issue I was using JDK 1.9 with IntelliJ 14, I solved reinstalling Java with latest version of JDK 1.8(1.8.0_161 in this case)
I also removed the 1.9 version from
HKEY_CURRENT_USER\Software\JavaSoft\JRE\Security Baseline
Try to delete the .IntelliJIdea15(depends on version) from C:\Users\Username
When you start IntelliJ it will create the folder again.