Error in gradle in android studio

4.3k Views Asked by At

I was setting up Android studio on windows 7 for the first time and I got this error :

Gradle 'MyApplication5' project refresh failed
Error:Unexpected lock protocol found in lock file. Expected 3, found 0
3

There are 3 best solutions below

1
shaithana On

Try to delete the .gradle folder in your project and restart Android Studio.

0
Mahesh Gawhane On

In android studio, Click on "File" then click "Invalidate caches/Restart" and confirm. if this not solves your problem then delete .gradle file from your project file and restart Android Studio.

0
Sanket Parchande On

You can disable this experimental feature from File → Settings → Experimental → Gradle → Only sync the active variant