Android Studio 3.1: Erroneous unresolved references in editor
- Exit Studio.
- Delete .idea/ (seems to me that's most important), build/, app/build directories.
- Start Studio
- Set Settings -> Build -> Gradle settings back (last stable Gradle local distribution in my case).
- Clean&rebuild project.
Helps me.
Delete {projectDir}/.idea/libraries
, then go to File -> Sync Project with Gradle Files.