Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - Cannot resolve symbol themes, colorprimary,

I am seeing in Android Studio 3.1.2 an error for AppCompat themes and colors attributes like attr/colorPrimary.

But only in Android Studio. Compile and run does work.

For example:

enter image description here

enter image description here

My app.gradle:
enter image description here

supportLibVersion is 27.1.1!

like image 805
chrisonline Avatar asked May 15 '18 13:05

chrisonline


2 Answers

This helped in the similar problem. Maybe this help you:

Close the project from the File menu. Then open the project again as existing Android Studio project.

like image 109
V.March Avatar answered Oct 20 '22 08:10

V.March


I posted my answer on link mentioned by V.March. Basicly Invalidate Caches / Restart solved my problem

like image 2
ZeePee Avatar answered Oct 20 '22 06:10

ZeePee