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

 

4 comments
Comment actions Permalink

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)?

0
Comment actions Permalink

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

0

Please sign in to leave a comment.