Android Studio 3.1: Erroneous unresolved references in editor

print
  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.

 

exit,

delete project from projects lists, then import an exiting android studio project

 

FIX FOR 3.1.2 OR NEWER VERSIONS

Me and some of my colleagues have faced the same issue on AS 3.1.2, but a simple Sync didn’t help us. For us the solution was a bit different:

  1. File -> Invalidate Caches -> Invalidate
  2. File -> Close Project.
  3. Remove the project from the AS project selector window.
  4. Quit from Android Studio
  5. Start AS and open project again

reopen project intructions

EXTRA ADVICE IF YOU ARE FACING THIS ISSUE CONSTANTLY

Some of you are constantly facing this issue, and this “solution” fixes it only temporarily. At the time we started getting this error, we used gradle wrapper 4.6 and Android gradle plugin 3.1.0, but since then we went back to gradle 4.4 and we use it with the latest Android gradle plugin, and we haven’t seen this issue since then.

Android Studio: “Please select Android SDK”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.