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\'
you can try invalidating the cache and restarting intellij, in many cases it will help.
File -> Invalidate Caches/Restart