Why so red? IntelliJ seems to think every declaration/method cannot be found/resolved

前端 未结 28 1186
予麋鹿
予麋鹿 2020-12-12 11:22

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

相关标签:
28条回答
  • 2020-12-12 12:02

    I had the same issue, what fixed it for me was:

    Go to File>Setting>Maven, I set the Maven home directory, settings file and local repo.

    Go to Maven Projects and click on Reimport All Maven Projects

    This did the trick!

    0 讨论(0)
  • 2020-12-12 12:03

    I face the same issue when upgraded Intellij version. It was resolved for me by using old maven than the one bundled with the new Intellij.

    0 讨论(0)
  • 2020-12-12 12:04

    The issue was that the file I was trying to import was so large that IntelliJ wouldn't run any CodeInsights on it.

    Setting the idea.max.intellisense.filesize option to a higher value as per the instructions on this answer resolved my issue.

    0 讨论(0)
  • 2020-12-12 12:07

    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.

    0 讨论(0)
提交回复
热议问题