I have a following error andI have no clue why this is happening.All I did was add the flag called \"mon\" and tried to add it to the custom view in the xml. flags other than \"
You declared the name of property but the type of input is not specified change your attrs to
<declare-styleable name="MonView">
<attr name="mon_type" format="flags">
<flag name="sol" value="0x01"/>
<flag name="dan" value="0x02"/>
<flag name="tin" value="0x04"/>
<flag name="mon" value="0x06"/>
</attr></declare-styleable>
Hope it helps :)
I believe, you have a custom view of some kind that uses this attributes, something like MonView. Could you please provide the code of this View as well? It should be either a java or kotlin class. It seems that when you get your attributes on the runtime in your view that utilises them, it will try to map received attribute value to some preset array position or enum type inside you custom view type. Since you've only added the new attribute to the xml, but haven't updated the array (or enum, or just some logic with a switch/case, however it's implemented) you get this error. Hope, this will help. I'll be able to tell you more if there is a right code snippet. Cheers.