I\'m new to Gradle build system. I want to do some basic functions on it. I\'m running/building it in command line. I am referring User guide. And, doing some simple tasks.<
Remove the lock files in the gradle cache by executing something like this:
find ~/.gradle -type f -name "*.lock" -delete
I was stuck with this error and had to blow away the contents of my user's .gradle/caches/
folder and the contents of my project's .gradle/
folder to get going again.
Not sure what caused it, possibly a failed build that kept these files in a locked state?
For Windows machine:
Open Task Manager(Ctrl-Alt-Delete and check Process)
-> If you run two instance of android studio, Close One (End Task)
-> Then close OpenJDK Platform Binary
-> Gradle sync now on AndroidStudio and it will work now
For MAC machines
Please open the "Activity Monitor" and select the "memory" option and force quiet the Android studio and other running java processes, it will solve this issue.
For me, on a Mac, select File
along top, then choose Invalidate Caches / Restart...
done the trick.
A nice simple solution if it works for you too!
Just kill java.exe process fix my problem.
-- Edit --
if not fixed then:
if not fixed then:
if not fixed then: