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?
If you want to explicitly stop running Daemon processes for any reason, just use the command gradle --stop . This will terminate all Daemon processes that were started with the same version of Gradle used to execute the command.
You can call . \gradlew --stop in a Terminal and it will kill all gradle processes in Android Studio for Windows OS. You Can find terminal at left bottom of your android studio for windows. Save this answer.
To clear your gradle cache in android studio: open terminal and. run gradlew clean.
How can I find out if the gradle daemon is running? Running in terminal gradle --status will give the status of the gradle. You'll see "No Gradle daemons are running" message if there's no gradle daemon running. Otherwise, you'll see status of the daemon.
Try deleting the /Users/Friso/.gradle
directory and rebuild.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With