简体   繁体   中英

Maven “Cannot find symbol” intellij

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**

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM