5

Why setting a layout background with shape drawable causes a warning on Android Studio 1.4 telling that cannot set background in RelativeLayout?

Android Studio warning about invalid background:

enter image description here

Drawable shape used as background:

enter image description here

Junior Mayhé
  • 16,144
  • 26
  • 115
  • 161
Fang
  • 3,652
  • 4
  • 16
  • 30

1 Answers1

1

Nothing to be concerned about. It is an android studio problem, it normally shows a preview icon of the drawable, but in this case it cannot show a preview of a drawable XML and shows that "error"

Junior Mayhé
  • 16,144
  • 26
  • 115
  • 161
Marcelo Cordini
  • 166
  • 1
  • 7
  • good, why FrameLayout cannot set background, do not show the suggestions! – Fang Nov 12 '15 at 09:43
  • Not sure if Android Studio dev team will have a look on this, but I have opened a ticket for investigation: https://code.google.com/p/android/issues/detail?id=196394 – Junior Mayhé Dec 06 '15 at 20:50
  • 1
    According someone from the Android Studio project, this issue is reproducible on `Android Studio v1.5.0` & `Android Studio v1.5.1`, but not on `Android Studio 2.0 Preview 2` – Junior Mayhé Dec 07 '15 at 12:27