Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Unexpected lock protocol found in lock file. Expected 3, found 0

After upgrading Android Studio to 1.3, I can't compile my project anymore. I am getting Unexpected lock protocol found in lock file. Expected 3, found 0.. I have tried with deleting my .gradle folder but that does not solve the problem. Anything else I can do?

like image 866
MaTTo Avatar asked Jul 31 '15 10:07

MaTTo


2 Answers

I have solved it by deleting the folder

c: \ users \ [myusername] \ .gradle \ caches \ 2.14.1

After reopening Android studio it was all fine

like image 112
Riz Avatar answered Sep 18 '22 20:09

Riz


okay here's very lightweight solution with steps:

  • Ctrl+Alt+Shift+S or File->Project Structure

  • Select Project from left panel

  • Now check your Gradle Version at right panel

  • In my case my Gradle Version is 3.3

  • Navigate C:\Users\ashish\.gradle\caches and delete your Gradle Version - 3.3 named folder.

  • Now restart or open your project again from workspace.

Greetings...your problem is solved.

like image 39
Ashish Tikarye Avatar answered Sep 19 '22 20:09

Ashish Tikarye