For linux users: press ctrl + H to show hidden files inside the home directory, because the .gradle directory is usually hidden, and delete the .gradle directory.
After that, you may receive the error message “cannot lock the output of the assembly”, then delete the lock files in the Gradle cache by doing something like this:
find ~/.gradle -type f -name "*.lock" -delete
source
share