Android Question [SOLVED]java.lang.RuntimeException: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}

Tim Chapman

Active Member
Licensed User
Longtime User
I have a B4XComboBox with a panel as the parent. I get this error:
java.lang.RuntimeException: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}

The error occurs when the layout is being loaded.

This all began when I added the toolbar from here which I want so I can change the toolbar menu:

If I make the Activity be the parent of the B4XComboBox then I don't get the error.
That won't work for me because I want the panel to be the parent. This allows me to make the panel visible or not visible which makes all the things on the panel visible or not visible.

Before I added the toolbar, the Panel being the parent of the B4XComboBox did not present a problem.

Also, why do I get a warning about the Toolbar being initialized in the designer and therefore I should not initialize it.
But in the example code above, the same is done with no warning.

Lastly, when I add a B4XComboBox to the above example with the pContent Panel as the parent it does not error.
Attached is the code that does not work.

***
I did not include the resources folder and reference in my code which are needed for the toolbar example above.
Once I did that, it works.
 
Last edited:
Top