Problem
In Intellij IDEA dependency is successfully imported, no warnings or problems are reported. However, it cannot find classes in the editor, saying "Cannot resolve symbol 'Class'.
Solution Check pom.xml file
- Find the maven file by Ctrl+Shift+N
- Type the file name: pom.xml
- Open the file
- Make sure that the dependencies in it.
Solution Reimport module
- maven tab (on the right side pane) or
- right click your pom.xml and pick Maven
- Reimport All maven projects
Solution Download Sources
Sometimes IntelliJ doesn't do this automatically, something you can change in :
- Settings
- Build, Execution, Deployment
- Build tools
- Maven
- Importing and enable Import Maven projects automativally.
Solution import the class
- Put your cursor on the red part of the import
- the import org.my.class.Class; part
- wait for the red lamp to appear
- and the choose "add to class path"
P.S. you can check also : Intellij IDEA 2017 unable to resolve class