1

After upgrading to Android Studio my styles.xml suddenly has lots of errors.

Theme... is no longer recognized

When trying to change the parent property Android Studio suggests 'TextAppearance.Widget.AppCompat.Toolbar' as a valid value when typing...

Also I had to prefix ?attr/... attributes with ?android:attr like below...

android:background="?android:attr/selectableItemBackground"

Note that my app will compile and run...

Are these bugs? (probably...)

If not; What is the reason for the change?

If so; What prefix is missing for my themes?

Thanks, Ove

Ove Stoerholt
  • 3,843
  • 4
  • 25
  • 33

2 Answers2

1

I get that from time to time as well, I usually try the following:

  • Clean & Rebuild Project
  • Sync project with Gradle files
  • File -> Invalidate caches / Restart -> Invalidate and Restart

A combination of these in a random order usually solves it (I know, I know, really scientific method... but hey as long as it works :))

patrick.elmquist
  • 2,113
  • 2
  • 21
  • 35
1

It can be solved after Sync project with Gradle, Clean , Rebuild the Project. I think it is a bug of android studio 3.0.