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\'
Right click on pom.xml file, go to Maven click on Reimport. I had similar problem and this worked for me.