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.
Permanent Fix for Can't Edit Files in Android Studio On Windows. Performing the following steps:
[SYSDRIVE]:\Users[your username] (ex. C:\Users\Venky)
In this folder there should be a folder called .AndroidStudioBeta or .AndroidStudio (notice the period at the start - so on some OSes it would be hidden).
This should reset your Android Studio settings to default.
This will not clear any projects history.
your file system maybe in read only
move your project to another folder or drive
This appears to be that the Code view loses focus to the Project view. That's why I can't edit the code and the search box appears: because The focus is with the Project view, permanently.
I couldn't find a permanent solution. However, by accident, I found a workaround that is less annoying than restarting Android Studio:
When you lose focus to the Project view, click on the far right of the Code View, where the scrollbar exist.
I tried to figure out what causes the Project View to steal the focus permanently but I couldn't. Until someone do, this will be the accepted answer.
I was also having this problem and had tried to delete the configuration files and reinstall the Android Studio, but the problems were still there. Then I found out that if I uncheck the "vim emulator" under tool, the problem goes away!
I had this issue appear after using external displays via USB DisplayLink for some time. After disconnecting USB and reconnecting everything returns to normal but the issue may still appear after a few days, this is just a temporary fix.
I have faced same problem and tried some of the solutions above. None of worked for me. After File
-> Invalidate Caches/Restart
the problem have been solved.