This problem happens intermittently for different libraries and different projects. When trying to import a library, the package will be recognized, but the class name can\'
in my case the solution was to add the project as maven project, besides the fact that i imported as maven project :P
go to pom.xml -> right click -> add as maven project