I upgraded Android Studio today to 3.1, and now Android Studio says it cannot resolve symbols for most of the resources (for example ThemeOverlay
in styles.xml
or ?attr/actionBarSize
). This doesn't seem to prevent me from building or running in an emulator so far, but these errors are making me nervous.
Has anyone else experienced this issue? How can I go about resolving it? I have tried syncing gradle and cleaning my project but it doesn't seem to help at all.
Any ideas?
I'm using Android Studio 3.1 with Gradle version 4.4 and Gradle Plugin 3.1.0
EDIT: This issue affects updating to Android Studio 3.1.1, 3.1.2, 3.1.3, 3.1.4 as well as Gradle Plugin to 3.1.1, 3.1.2, 3.1.3, and 3.1.4. However, the answer below still works.
Close the project and import it again. Worked for me today.