Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot lock file hash cache when gradle was aborted

Tags:

gradle

locking

I canceled a running Gradle build and now I get the following message whenever I restart it:

Could not create service of type FileHasher using BuildSessionServices.createFileHasher().
   > Cannot lock file hash cache (/data/.gradle/6.4.1/fileHashes) as it has already been locked by this process.
like image 445
Torsten Avatar asked May 27 '20 07:05

Torsten


Video Answer


2 Answers

try running (if gradle in installed on your machine and in the PATH)

gradle --stop

or

./gradlew --stop

in your project directory from the command line. worked for me.

like image 195
YYJo Avatar answered Jan 04 '23 02:01

YYJo


run

gradlew --stop 

in the terminal for Windows

For Mac user run

./gradlew --stop 

from root of you project

like image 31
muhibbin_munna Avatar answered Jan 04 '23 02:01

muhibbin_munna