7

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,577
  • 10
  • 38
  • 61

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,740
  • 1
  • 20
  • 29
2

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

ZeePee
  • 385
  • 6
  • 11