Bad handling of malformed drawable xml in Android project

I’ve run across this bug a few times when editing drawable xml files in an Android project in Water. If at any point the xml is malformed, Water displays the “Something went wrong dialog” as soon as the editor gains focus. Thus I am not able to correct the malformed xml in Water - I have to terminate Water, fix the xml file in another editor, and then open Water once the xml is valid.

For example, I was creating a <shape> in a layer-list xml file. I copy-pasted android:shape="rectangle" into my <shape> tag, but was missing a whitespace. The result was <shapeandroid:shape="rectangle">. But then when I click between “shape” and “android” to type the whitespace, I immediately get the “Something went wrong” dialog, so I am not able to fix the xml in Water.

Can you give me a test case file that shows this?

The file /res/drawable/test.android-xml in the test case is currently uneditable in Water for me.

crash.tests.zip (30.2 KB)

hmm, I cannot repro this here, even after removing the space:

Does reproduce in Water though. odd, as this should be the same…

1 Like

Thanks, logged as bugs://82817

1 Like

bugs://82817 got closed with status fixed.

1 Like