Module compiles, but editor shows compilation issues
Module compiles, but editor shows compilation issues

Since I reorganized my environment today (New project, clean checkout of code from SVN), I have not been able to edit code without the editor showing 'compilation issues' for code that does actually compile.
I have a bunch of Maven modules that compile file using Maven (both from command line and from IDEA) and compilation from IDEA (Build -> Compile/Make) works as well.
But when opening one of the java files, all referenced types that do not originate from my Maven module itself (types from dependencies) are marked as compilation problems ('Cannot resolve symbol XYZ') in the editor. Code completion only reveals types from dependencies when I type the fully qualified name, but a type entered this way is still displayed as a compilation problem (red).
I have no clue what is going wrong here. Has any encountered this behaviour before? I am using IDEA 13.1.1.
Votes
2Share
24 comments Mark Vedder Created April 18, 2014 14:15 Comment actionsTry invalidating your caches and restarting IDEA (File > Invalidate Cache). Wait for IDEA to re-index your project (Status indicator on lower right status bar). The caches will sometimes become corrupted. This is most likely to occur upon reorganizing a project as you mentioned you did.
4 ========================================================================================================= https://stackoverflow.com/questions/50636628/showing-compile-error-in-intellij-idea-in-editorShowing compile error in IntelliJ-idea in editor
Ask Question Asked 4 years ago Modified 1 month ago Viewed 5k times edited Nov 12, 2018 at 10:46 asked Jun 1, 2018 at 5:30

- no ..still facing the same issue. maven settings.xml is pointing to correct maven settings.xml – yugi Jun 1, 2018 at 8:39
- 1 As a last resort, can you try to create your project anew? (e.g. by coping your project folder without the *iml files / .idea folder) and see if you get the same errors. If you don't it's your (intelliJ) project's config. If you still have the issue, it's perhaps an IntelliJ issue itself. Try to see if there is an update or try the EAP. and/or disable all plugins. – BitfullByte Jun 1, 2018 at 9:04
- yeah .. i will try this – yugi Jun 1, 2018 at 9:22


This should hopefully solve your problem.
se-share-sheet#willShow s-popover:shown->se-share-sheet#didShow">Share Improve this answer answered Jun 1, 2018 at 16:23



I resolved this issue by deleting the local maven repository and restoring the default setting of Intellij
- Go to File --> Manage IDE Settings --> Restore Default Settings
- Go to File --> Settings --> Build, Execution, Deployment --> Build Tools --> Maven --> Get the Local repository path and delete it.
- Open Intellij --> open project --> Go to Terminal --> mvn clean install --> error will disappear after build success