Reputation: 825
Gradle sync failed:
Timeout waiting to lock file hash cache (C:\Users\HELLO\.gradle\caches\4.1\fileHashes). It is currently in use by another Gradle instance.
Owner PID: 10116
Our PID: 7136
Owner Operation:
Our operation:
Lock file: C:\Users\HELLO\.gradle\caches\4.1\fileHashes\fileHashes.lock
Consult IDE log for more details (Help | Show Log) (1m 23s 517ms)
-> Gradle build is failing -> Unable to delete filehash lock file. It throws file in use
Upvotes: 1
Views: 2896
Reputation: 41
To handle this problem go through the following points.
Upvotes: 4
Reputation: 20140
Delete everything under below path.
C:\Users\HELLO\.gradle\caches\
There is a fileHashes.lock
that is holding a global lock which is preventing you from running your script.
Upvotes: 0
Reputation: 825
Go to .gradle directory and delete all files in caches
Sometimes it was notable to delete filehash.lock file and it will throw an error unable to delete file. So do the following steps
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
Upvotes: 2