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

前端 未结 28 1401
予麋鹿
予麋鹿 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 11:41

    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.

提交回复
热议问题