1

I have android:minSdkVersion="11" android:targetSdkVersion="11".

In my theme I use reference to @android:color/holo_blue_light

Until now (during many months) it was fully ok. Now I've changed in one place @android:color/holo_blue_light to @android:color/background_dark and suddently in all places where I have holo_blue_light I have an error:

@android:color/holo_blue_light requires API level 14 (current min is 11)        Android Lint Problem

Did they change something in sdk itself? Even if I manually return to the previous version of file with holo_blue_light only I still have the same error. (And for sure the newest definitions of sdk are automatically downloaded by Eclipse from Internet. And it worked during many months with sdk 11 as minimum required).

Any help? Isn't it any sdk problem instead of my app problem?

user2707175
  • 1,133
  • 2
  • 17
  • 44
  • holo_blue_light requires API level 14 for sure. See http://developer.android.com/reference/android/R.color.html#holo_blue_light. For some reason Lint missed that. – ramaral Dec 31 '13 at 21:58
  • So you want to say that if I run my app in android 3.0 it would not work (even if during many months it was compiled ok)? – user2707175 Dec 31 '13 at 22:00
  • Btw, do you perhaps know how to get main theme color - which is holo_blue_light for android 4.0.4 but ex. in 4.2.2 user can set main theme color as a different one - ex. mint. How to get that main color? Something I could use in my style definition as @android:color/style_main_color (I'm not able to find anything like that)? – user2707175 Dec 31 '13 at 22:02
  • `So you want to say that if I run my app in android 3.0 it would not work` - I think yes, it would not work, but am not sure! The best is to try. – ramaral Dec 31 '13 at 22:17

1 Answers1

7

I know that this is old, but for anyone looking in the future, the holo color definitions are:

<!-- A light Holo shade of blue -->
<color name="holo_blue_light">#ff33b5e5</color>
<!-- A light Holo shade of gray -->
<color name="holo_gray_light">#33999999</color>
<!-- A light Holo shade of green -->
<color name="holo_green_light">#ff99cc00</color>
<!-- A light Holo shade of red -->
<color name="holo_red_light">#ffff4444</color>
<!-- A dark Holo shade of blue -->
<color name="holo_blue_dark">#ff0099cc</color>
<!-- A dark Holo shade of green -->
<color name="holo_green_dark">#ff669900</color>
<!-- A dark Holo shade of red -->
<color name="holo_red_dark">#ffcc0000</color>
<!-- A Holo shade of purple -->
<color name="holo_purple">#ffaa66cc</color>
<!-- A light Holo shade of orange -->
<color name="holo_orange_light">#ffffbb33</color>
<!-- A dark Holo shade of orange -->
<color name="holo_orange_dark">#ffff8800</color>
<!-- A really bright Holo shade of blue -->
<color name="holo_blue_bright">#ff00ddff</color>
<!-- A really bright Holo shade of gray -->
<color name="holo_gray_bright">#33CCCCCC</color>

See https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/colors.xml or this answer for more details.

Community
  • 1
  • 1
zelanix
  • 3,326
  • 1
  • 25
  • 35