I often get stuck when run gradle build task in android studio. If I force stopping the android studio and restart it, then run again, there will be an error that some .lock files are occupied, which are really hard to delete them one by one manually.
I have tried to delete .gradle folder in project and ~/.gralde/caches folder and the error was solved, however it took a lot of time to re-download some cached files. So which folders should be deleted in my situation after all? Thanks for any comment!