Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.1 Cannot Resolve Symbol (Themes, Widget, attr, etc.)

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.

like image 887
JPM Avatar asked Mar 27 '18 22:03

JPM


Video Answer


2 Answers

Close the project and import it again. Worked for me today.

import project

like image 65
marko Avatar answered Sep 21 '22 18:09

marko


Close and reopen project as existing Android Studio project

like image 34
Andrew Glukhoff Avatar answered Sep 20 '22 18:09

Andrew Glukhoff