First time here? Check out the FAQ!

"I am receiving Error: Unexpected lock protcol found in lock file. Expected 3,found 0."

0 votes
asked by about Android Studio
edited by

I am working on one project while building gradle it shows gradle sync failed and I am receiving "Error: Unexpected lock protocol found in lock file. Expected 3,found 0." Now I want to know how to solve this error.

1 Answer

0 votes
answered by (329k points)

It's actually very simple to overcome this issue. Navigate to the project folder and delete the following one .gradle. Restart the IDE and it should work properly afterwards.

Or in the IDE go to File -> Project Structure then Select Project and locate the gradle version. Navigate to C:\Users\YOURUSERNAME\.gradle\caches and delete the version you've identified.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register