Java Maven Project succesfuly building, but opened class files show "Cannot resolve ..." for almost each class used
Answered
HI
I have a java maven project, which is able to build well in the IDE. However each class file i open ends complaining it cannot resolve imported packages It shows the red markers every where. I tried invalidating cache , restarting, Nothing seems to be helping.
The required dependencies are present in the pom.xml.
Any help is appreciated. This is pretty frustrating to see all these red marks in tons of files.
Best Regards
Ani
Please sign in to leave a comment.
What IntelliJ IDEA version do you use? Does it help if you delete IntelliJ IDEA system directory when IDE is not running (https://intellij-support.jetbrains.com/hc/articles/206544519)?
See also https://youtrack.jetbrains.com/issue/IDEA-250887 and the linked issues.
Hi Serge
Thanks for the suggestion. Deleting the system directory and restarting worked. So the question is , what causes it to go to this state. Can we do anything to avoid it?
Best Regards
Ani
We don't know yet, it's being investigated in https://youtrack.jetbrains.com/issue/IDEA-250887.