Reputation: 1971
I just installed Android Studio and I have a problem:
after some time of work, I'm not able to edit files anymore, I have to restart the IDE to edit them for a while again.
That's very annoying. Is there a way to solve this? I saw others on google having almost the same problem (mostly on ubuntu), but I wasn't able to find any solution except a temporary one: if I click on the scrollbar of the file I'm able to edit it again, but the problem will be triggered again if I change file or do anything else outside of it; so the actual problem it's the editor not getting the focus by clicking on it.
I'm on Windows 8.1.
Upvotes: 9
Views: 1927
Reputation: 7390
Assuming you are using Ubuntu OS.
As given here
The bug seems to be triggered by some missing synchronization between IBus (the server) and Xlib + AWT (the client JVM), exposed by a combination of a quick succession of key presses and the client’s slower event handling. The bug has already been reported upstream:
the bug is already reported here
The 2 workarounds that helped me were :
Workaround #1: Force ibus in synchronous mode
$ IBUS_ENABLE_SYNC_MODE=1 ibus-daemon -xrd
Do this preferably before starting Studio. This workaround was suggested in https://code.google.com/p/ibus/issues/detail?id=1733 for a different Java application facing the same problems.
Workaround #2: Disable IBus input in Studio
$ XMODIFIERS= ./bin/studio.sh
This will only disable input methods for Studio, not the other applications. Restarting the daemon while Studio is running (‘ibus-daemon -rd’) effectively disables the input methods for all other applications, and can also crash Studio's JVM with a segmentation fault.
Upvotes: 9
Reputation: 26
My robotics team had this problem before on Windows 7. It has been a while, so I don't remember exactly how (this was years ago), but we had found that the problem was related to the project files being in a google drive and the syncing process would make Android Studio lock the files into read-only mode. the workaround we found was to take the files out of the drive folder and use a version control system.
Upvotes: 1