For some unknown reason, I can't edit files in Android Studio. This includes both Java and XML files.
When I launch Android Studio (v1.2.2), everything is fine. However, after some time, I lose the ability to edit files content. Here is what I noticed:
search for:
box starts appearing on the top of the left panel (Project window), and it starts filtering the project files according to what I type!MainActivity
file name is in grey (See the screenshot below). I'm not sure if this is because of something I did, or if it is how Android Studio identifies the main Activity in the project.The problem faced has been solved by reverting Android Studio to its default settings. Show activity on this post. I was facing this exact same problem. I solved it by pressing the Insert key once—apparently, I had inadvertently toggled Insert/Overwrite mode, and that was preventing me from editing code.
In Android Studio, you will see all the projects's XML files and can edit them with all the tools Android Studio provides, including the visual designers. As you make changes and save them in Android Studio, they will automatically reflect back into your Elements project inside Visual Studio.
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.
click on vertical scroll bar area to get focus in project view
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With