Android XML Layout Problem

I have some buttons within a TableRow nested within a LinearLayout (direct child so in effect another LinearLayout).

I wish to delete one (child) button but despite my best attempts IDEA 13.1.4 will not allow me.

Deleting the button in the GUI editor just shows an empty button tag in the GUI with no attributes that then cannot be deleted and is not shown in the XML.

Deleting the button directly from the XML and the layout just crashes and refuses to render (asks to send a bug report...)

Deleting the entire file and recreating makes no difference, nor does cleaning caches/restarting/rebuilding....

Extracting a layout also often freezes the IDE if the layout contains components that aren't instantiable (don't even get the annoying can't instantiate warning...)

Any ideas to resolve the child to a TableRow problem however appreciated.

Note. If I add another component I can then delete the button, but when deleting the originally added component the same situation occurs, i.e. the view crashes and sometimes the IDE freezes.

When deleted the layout crashes in the editor and when deployed to the device the logcat shows:

    java.lang.NullPointerException
            at android.widget.TableRow.measureNullChild(TableRow.java:184)

So it has something to do with the TableRow child not being deleted properly within the editor?


Solved:
Changed the TableRow to a LinearLayout (which it was in effect anyhows..)

Please sign in to leave a comment.