So I happen to be building Gradle. I’ve been running this build with the daemon. I noticed that when I try to run “gradle clean” it fails because this tries to delete jar files that the daemon process has open (this is Windows 7). So, I decided that I would do “gradle --stop” and then “gradle --no-daemon clean”. This failed with the same error. When I looked at my processes, I found the Gradle daemon was still running. When I then did “gradle --stop”, it said “No Gradle daemons are running.”.
I then manually killed the daemon process and also commented out the “org.gradle.daemon = true” setting in my gradle.properties, mostly because I conclude that Gradle startup isn’t that slow for me without the daemon. The next “gradle clean” succeeded.