Android Studio hangs / Freezes when project build fails

后端 未结 7 604
闹比i
闹比i 2021-02-05 01:38

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

7条回答
  •  感动是毒
    2021-02-05 02:08

    @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:

    1. Shut down Android Studio (force to kill or just unplug the usb you will be good to go)
    2. Go to the directory of AndroidStudioProjects and move the application directory out to some other location (outside AndroidStudioProjects).
    3. Restart the android studio, now you will be shown the screen asking you whether you want to start a new project or open an old one.
    4. Again paste the folder you have cut and kept aside in step 2 back to AndroidStudioProjects directory.
    5. In the android studio prompt, select open existing project and select the directory you have now just pasted to AndroidStudioProjects.

    It should work for my case.

提交回复
热议问题