I am experiencing a very wired problem since this evening.
If I have any errors in my android project, and build is failed, then my Android studio gets frozen / stuck. I
Based on barbarian's answer I did this on my Mac:
start a terminal chmod +x gradlew ./gradlew ./gradlew build
This last step showed an error in my xml file, indicating that I used unescaped single quotes. Fixing that solved the hangup.