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
@Hesam's answer doesn't work for me. Using OSX and AS 1.2.1.1, my building stuck in 'Scanning files to index' and I cannot solve it even after restarted my Macbook. Below work for me:
It should work for my case.