2
votes

I am using IntelliJ, my project consits of 4 modules all are interdependent on core

core
web
delegate
database

All of sudden I see red lines inside my code. One thing I did was to optimize imports. Did I do any mistake as this project is cloned from GIT and there are lot of changes. I think deleting this project and cloning once again will erase all my pull requests submitted and branches created.

I have tried all the options to

  1. Invalidate Cache and restart
  2. Maven--Reimport
  3. Synchronize
  4. Deleted the target folders and rebuild
  5. Stackoverflow threads

Still I am getting the errors and red lines overall the project

What I am missing, I have done nothing to opening the core module just Optimize imports and all of a sudden everything got corrupted.

Now I find the below error

**[70,12] cannot find symbol**
1
what is the symbol it can't find? did you perform a maven update? - Stultuske
I donot understand but I have added a piece of code and I thought it was fine which resulted in a big corrupt of everything. Now I have done git stash and everything gone. It saved lot of time now. - Sawyer
Have you setup the JDK properly on each module? Right click on module and then on "Open Module Settings" and "Platform Settings" -> SDK. - gil.fernandes
I have rechecked now its working, I have removed the code line i have added it got working - Sawyer

1 Answers

0
votes

Have you tried running a mvn clean install from the console? I've had this problem some times and this + reimpor all projects usually worked for me.

Also if you delete the project from intellij and import it again, the git info won't disappear as long as you don't delete the project folder itself.