[Solved]Unexpected lock protocol found in lock file. Expected 3, found 0


#1

Hi,

I have been able to successfully test my application using serve in the browser and now I’m wanting to test on my Android phone.

My build seems to take a very long time, averaging 5 minutes, and then it fails giving me this error.
FAILURE: Build failed with an exception.

* What went wrong:
 Unexpected lock protocol found in lock file. Expected 3, found 0.

I thought there may have been an error with my project, so I’ve created a blank project and I get the same error when trying to run on my Android phone.

The only information I can find on this error relate to the gradle files and Android Studio, there are fixes for Android Studio but nothing for Ionic.

Can anyone help me solve this issue?


#2

I have solved this problem if anyone comes across it. I deleted my .gradle folder from C:\Users*user*. This folder is hidden so you may need to show it, next time I ran my project, it downloaded the gradle files again and successfully ran. I think there may have been an issue with gradle files from Android Studio and Ionic.