Try re-importing the gradle project to do a “Gradle Sync” operation:
IntelliJ IDEA ➔ Help ➔ Find Action ➔ search for “import” or “reimport” ➔ Click on: “Reimport All Gradle Projects”
Edit: This has changed in August 2020: Click the Gradle toolbar/tab at the top-right to expand it, then locate a small refresh button at the top that looks like this 🔄 ➔ click “Reload All Gradle Projects” (it’s the small refresh button).