For some unknown reason, I can\'t edit files in Android Studio. This include both java and xml files.
When I launch Android Studio (ver 1.2.2) , everything is fine.
tl;dr, open the search with cmd + shift + f and close it again. All should be good.
I was also having the problem of suddenly losing the ability to type in the editor on my mac. There was never any rhyme or reason. I tried the suggestions here and sadly they didn't work.
What worked for me is opening the search box with cmd + shift + f (on mac). Once that opened and I closed it, I could type again. I also noticed the things I had been trying to type were in the search bar.