3

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
Jonathan Allard
  • 18,429
  • 11
  • 54
  • 75

3 Answers3

7

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

N J
  • 27,217
  • 13
  • 76
  • 96
shaithana
  • 2,470
  • 1
  • 24
  • 37
1

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.

Mahesh Gawhane
  • 348
  • 3
  • 20
0

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

Sanket Parchande
  • 894
  • 9
  • 14