ResXMLTree_node header size 0x0 is too small in Android Menu
-
02-01-2020 - |
Question
I'm currently setting up an app and stumbled upon some error which I don't understand. I have a menu XML and provide here two icons. For the menu in the top right, I want to stick to the standard and use the three vertical dots which go by this name:
ic_menu_moreoverflow_normal_holo_light
Unfortunately though, I get this error: W/ResourceType(11504): ResXMLTree_node header size 0x0 is too small.
... and my R won't compile anymore. However It works, for example with
ic_menu_info_details
or
ic_menu_search
Copying the icon itself in drawables didn't work either (?) Does anyone have an explanation? The exisiting questions don't refer to this.
Here is the full code:
<item
android:id="@+id/menu_send"
android:icon="@android:drawable/ic_menu_info_details"
android:showAsAction="ifRoom|withText"
android:title="Options"/>
The error comes, when I try to incorporate it like:
<item
android:id="@+id/menu_send"
android:icon="@android:drawable/ic_menu_moreoverflow_normal_holo_light"
android:showAsAction="ifRoom|withText"
android:title="Options"/>
Cleaning the code yields that R won't compile anymore. I just would like to understand, maybe this icon doesn't exist? I googled it though.
Solution
After asking google i've found this:
It appears to be that this particular icon wasn't available pre Honeycomb (API 11). I am guessing that you may be getting this error because you're targetting the application to be supported pre-Honeycomb.
Can you try setting this on your manifest.xml:
<manifest>
<uses-sdk android:minSdkVersion="11" />
...
</manifest>