I think user Sap is correct, at least in my case. You should not have to manually add the dependency.
Did you change the dependencies in the gradle file without syncing intellij? Try this button:

For more information, see:
https://www.jetbrains.com/idea/help/synchronizing-changes-in-gradle-project-and-intellij-idea-project.html