Background: I've been fighting with Studio/Gradle for a day or so at this point; there were initially multiple PEBKAC errors (namely permissions and resource limits) that have since been resolved. Unfortunately the google-fu has failed me for this current error.
The error specifically occurred attempting to complete ./gradlew clean
which did not complete successfully; it failed about 30s in.
I temporarily 'fixed' the problem by blowing away the offending git repo and cloning it anew. I discovered the error seems to occur only on a specific branch (ie, switch to x_branch, run 'clean project,' receive error), but have not yet figured out why. Attempting to switch to another branch or back to master after receiving the error does not revert gradle back to a working state; the error remains.
Error:
Gradle project refresh failed: Error: Already finished
System env: Android Studio 3.1 // Gradle version 171.4250
My question(s): Has anyone seen this error before? What does this error mean and how do I prevent it from re-occurring?
Restarting Android studio :
File > Invalidate Caches/Restart worked for me
This is what happen with me.
One of the folder (build folder) can't be access. I can't even open it using Windows Explorer. It looks like the folder has been corrupted.
I did the following:
Good luck! I hope this solution help someone.
UPDATE
After deleting the folder, you may want to Invalidate Caches / Restart...
I just hit on the same problem again. Deleting folder without Invalidate Caches / Restart...
doesn't work :(
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