Reputation: 2438
I was working on Android studio (on the Mac) when I got the following message:
Error:Could not read cache value from '/Users/Friso/.gradle/daemon/2.2.1/registry.bin'.
I don't know what caused it, since I didn't do anything to the build files.
How can I fix this?
Upvotes: 34
Views: 29044
Reputation: 31
Delete registry lock file from c:\users{username}.gradle\demon{version} and then build again
Upvotes: 0
Reputation: 233
In my case I had stopped the grade in between and turned off my laptop.The next time I opened and ran my gradle it gave error of could not read cache value from registry.bin. The error was coming in every project of mine. I did the following: Go to C:\users\username.gradle\daemon\gradle version and delete registry.bin.lock file. Hope this will solve your problem.
Upvotes: 0
Reputation: 2325
The gradle directory (or one of its caches) is likely corrupted in some way. The easiest way to proceed is to delete the directory entirely. Navigate to /Users/Friso and run:
sudo rm -r .gradle
sudo rm -r ~/.gradle
This recursively removes the directory and all files within it. The latter is your home gradle cache.
Upvotes: 3
Reputation: 1968
In my case, the registry.bin file was empty. However, there was a lock which seemed to be causing the issue. I deleted the lock file - registry.bin.lock from the /Users/varun/.gradle/daemon/2.8/ directory and it worked. Hope this helps.
Upvotes: 21
Reputation: 131
It also happened in my Linux environment. Deleting .gradle folder and rebuilding the project worked again.
Upvotes: 3
Reputation: 80020
Try deleting the /Users/Friso/.gradle
directory and rebuild.
Upvotes: 70