KitKat specific- android.content.res.Resources$NotFoundException: File res/drawable/list_selector_white.xml from drawable resource ID

前端 未结 3 1581
执笔经年
执笔经年 2020-12-18 05:13

I tried the answer here, but it didn\'t work for me. I am using an xml as background and getting exceptiion - Resources$NotFoundException: File res/drawable/list_selec

3条回答
  •  萌比男神i
    2020-12-18 05:53

    Basically no, it's a bug that was fixed in Lollipop. The suggestion (until you can minSdkVersion=21) is to create a different drawable XML file for each different color you need (and have that as a theme attribute, I assume).

    The duplicate question, answers and comments discuss this bug: How to reference colour attribute in drawable?

提交回复
热议问题