Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA suddenly lost all class relations. Cannot resolve symbol

I committed and pushed my changes business as usual and packed my laptop. As I docked it at the office and opened IntelliJ IDEA again. All the project classes were shouting red. As in No classes were found, all imports were red, as in not found. The project builds and deploys as usual.

Every class reference just gives the error "cannot resolve symbol..." and is red. Even the most basic sch as @Inject annotation (javax).

I tried the usual tricks such as maven reimport to no avail. What should I do to fix this? Clone the project again?

Using mercurial repository with external GUI HgTortoise, IDEA version is 15.0.4

like image 627
Steve Waters Avatar asked Feb 06 '23 15:02

Steve Waters


2 Answers

Try File -> Invalidate Caches / Restart

like image 104
nllsdfx Avatar answered Feb 11 '23 17:02

nllsdfx


Delete .idea folder and .iml file, then reopen the project, as in my case.

like image 23
User007 Avatar answered Feb 11 '23 19:02

User007