android – set a color value in the attributes file-ThrowExceptions

Exception or error:

I need a hit on how to set a color I have defined in the color.xml file inside my attrs.xml file.

for example in color.xml I use <color name="mypreferencesummary">#e27229</color>

and in attrs.xml I use <attr name="mypreferencesummary" format="reference|color" />

when I call it I get the android.view.InflateException: Binary XML file line #43: Error inflating class <unknown> exception.

How to solve:

Is it actually occurred from those xmls?
That error seems to be a missing constructor error when you create custom view and use it in xml layout.

Leave a Reply

Your email address will not be published. Required fields are marked *