Had this Xms
and Xmx
memory low issue happen to me any time I was working with the XML. I also tried increasing this memory, only to find that it just took a little longer for it to happen again.
After getting very frustrated and almost deciding to convert all my current projects back over to Eclipse, which I did not want to do, I figured out what was causing it and was able to repeat this failure and prevent it every time.
While editing the XML in (Text view), and using the "Preview" render view, this causes the loss of memory, every time. Turning off "Preview" and using the Design tab to render the screen only, I am able to use Android Studio all day long, with no crash.
I wish this could be fixed for good, because it would be very nice to use the "Preview" render while editing the XML, however I am glad I can keep using Android Studio.