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 ha
Go into your local file project and search for the ".gradle" folder
Erase it and restart your IDE
In android studio, Click on File and then Click "Invalidate Caches/Restart" and then confirm.
None of the solutions here worked for me. For anyone who might run into my situation, here's what worked for me:
In addition to the steps here, I also
~/.gradle/daemon/[GRADLE_VERSION]
~/.gradle/wrapper/dists/gradle-[GRADLE_VERSION]-all
[PROJECT_PATH]/.gradle
Restarted Android Studio
You dont need to delete all your gradle files. Your just need to delete C:\Users\(your user name)\.gradle\daemon\(gradle version)\registry.bin.lock
and you are done!
I found a root cause of this problem for my case under Ubuntu 16.04. Both .gradle and project directories should have proper permissions. I've created this directories by myself and that's why they had more restricted permissions. I just let Android Studio to create both this directories bu itself and everything was working as expected.
It doesn't work none of above all.
It is done.