Hi, I’ve been having this problem for a few months. Whenever I try to run any gradle command, it errors with the following error:
FAILURE: Build failed with an exception. * What went wrong: Gradle could not start your build. > Could not create service of type FileHasher using BuildSessionServices.createFileHasher(). > Timeout waiting to lock file hash cache (project/.gradle/7.4.2/fileHashes). It is currently in use by this Gradle process.Owner Operation: unknown Our operation: Lock file: project/.gradle/7.4.2/fileHashes/fileHashes.lock
This error was from a
gradle wrapper command, it shouldn’t of tried to build anything. I’ve tried deleting
~/.gradle, restarting my computer, updating gradle, killing all the gradle processes after clearing the
.gradle folders, nothing has fixed it. It’s been a few months since I’ve used gradle and I remember there was a fix that would fix it for a build or two, but I can’t remember the details and it never fully fixed it. I’m on MacOS 11.6.2, been happening with Gradle 7.3 and 7.4.2. It will also error for
fileHashes.lock from any gradle command except
gradle --status. This issue prevents me from working on almost anything with gradle and java. Please tell me if you know a solution. Thanks!