I'm using Android Studio 1.2.2 on Arch and sometimes when i build the project the background task "Gradle: Executing Tasks [:app:assembleDebug]" gets stuck and never finish. This seems to happen randomly. It's also not possible to close Android Studio. I can stop the process but when i start Android Studio again the same problem occurs again. Only when i restart the entire system Android Studio works again.
The answers here did not help: How to fix Android Studio getting stuck executing Gradle tasks?