Freshly Installed Android Studio and started new android project. When tried to run it. Got this error from Gradle
Error:Could not open init
I had similar issues. For me the solution was simply to delete all files inside the folder C:\Users\Dexter.gradle\caches\2.2.1\scripts\ Also i removed VCS configuration from android studio. No need to install new Android Studio to fix the issue.
I have same problem. just restart your Gradle and then clean your project. i hope this help
I'm having the same problem and deleting just the cache.properties.lock is not enough.
The solution, as pointed before, is deleting the cache.properties.lock file, but not only in the folder pointed by Android Studio. I needed to remove every lock file inside .gradle\caches\VERSION.
So, I created a small .bat file with this:
del /s cache.properties.lock
Add this file to .gradle\caches\VERSION\ and run it. My Android Studio stopped complaining afterwards.
Hope it helps!
File -> Invalidate Cache / Restart worked for me.