8

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!

chrisonline
  • 6,949
  • 11
  • 42
  • 62

2 Answers2

17

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.

V.March
  • 1,820
  • 1
  • 21
  • 30
2

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

zulu_papa
  • 415
  • 6
  • 12