Eclipse not recognizing imports in same project

MoneerOmar picture MoneerOmar · Feb 8, 2016 · Viewed 7.8k times · Source

From time to time, Eclipse (Indigo) complains that certain classes in my projects cannot be resolved to a type. Even it shows the class in popup list, clicking import (see image) does not add the import statement! Even if I add it manually, it doesn't recognize it (and underlines the import package).

  • This happens only in certain projects.
  • Unresolved types are in the same project! (not in other dependencies)
  • cleaning the project does resolve this, but only temporarily.
  • My application consists of multi-module maven based projects.
  • All projects are maven-based.

Not recognizing imports

Answer

Claudiu-Florin Stroe picture Claudiu-Florin Stroe · Feb 8, 2016

Right click on your project name ->Maven ->Update Project