IntelJ Idea not able to find the project's own package.


I have a project with multiple packages. I don't find red line in any of my java file but when I try to build the project from Idea it shows multiple errors saying that "Cannot find the symbol X", where X is a class inside the project. The build from console goes fine. Please help.


Is that a Maven or Gradle project? Does it help if you delete .idea directory and reimport it?


It is a maven project. No, deleting .idea is not helping.


Please try File | Invalidate Caches | Invalidate and Restart. If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.


Please sign in to leave a comment.