IntelliJ inspection gives "Cannot resolve symbol" but still compiles code

The following trick resolved this issue for me:

  • Right click on the code editor
  • Hover on Maven and expand
  • Click on Reimport

My idea version is 12.0.4


First of all you should try File | Invalidate Caches and if it doesn't help, delete IDEA system directory. Then re-import the Maven project and see if it helps.

In some weird cases compiled classes may report wrong info and confuse IDEA. Verify that the classes from this jar report correct names using javap.