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'm getting the usual highlighted errors. On every declaration:
Cannot resolve symbol SomeEntityBean/Bean
and on every method:
Cannot resolve method SomeFunction()
How do I fix these false errors?
My problem solved by changing jdk to default , like this. Open Jdk was installed but don't know why intellij set configuration to java-8-openjdk-amd64. This was the problem.I have changed to default-java and no more red error.
Yet another work around!One of the solutions, which suggested clicking
Alt
Enter
didn't have the Setup JDK for me, butAdd ... to classpath
worked.This is if you see Java classes in red and get this error, "Cannot resolve symbol".
If you're importing projects into IntelliJ and none of the above solutions worked for you then give this a try. This is what worked for me when everything else failed.
Go to to your project folder and rename/delete the .idea folder which has the idea settings for your project. This would have been created from your old IntelliJ version. Once you have renamed/deleted the .idea folder, import your project into IntelliJ. You should not see any errors for your Java classes now. Hope this helped.