This sounds like it’s related to https://issues.gradle.org/browse/GRADLE-2795.
The easiest way to solve this will be to delete everything under C:\Users\Administrator\.gradle\caches
. There is a cache.properties.lock
that is holding a global lock which is preventing you from running your script.
For Mac OSX the folder is located in ~/.gradle/caches
. The Android Studio should show the proper path to the file which is causing the lock anyway.