Android Studio 3.1: Erroneous unresolved references in editor

  1. Exit Studio.
  2. Delete .idea/ (seems to me that’s most important), build/, app/build directories.
  3. Start Studio
  4. Set Settings -> Build -> Gradle settings back (last stable Gradle local distribution in my case).
  5. Clean&rebuild project.

Helps me.

Delete {projectDir}/.idea/libraries, then go to File -> Sync Project with Gradle Files.

I had the same problem on Android Studio 3.2.1.

The solution was to use stable ‘’, not alpha…

In the project build.gradle change the version like the code below (or if there is a newer stable version)

dependencies {
  classpath ''

If this doesn’t solve your problem than in File >> choose Invalidate caches/Restart… and on the next dialog choose Invalidate and Restart

1 step

2 step

Leave a Comment