Am trying to import an android studio project into a new machine. The import goes on fine and the directories of the project are displayed correctly.However, when i try to build or clean the project, android studio raises the following error
Gradle 'ngoma' project refresh failed
Error:Unexpected lock protocol found in lock file. Expected 3, found 0.
I have tried closing and reopening the project, changing the permissions of the folder containing the projects but nothing is changing. How can I solve this error??
Go into your local file project and search for the ".gradle" folder
Erase it and restart your IDE.
Removing the contents from .gradle folder in home folder and restarting Android Studio resolved the issue. Please note I earlier removed the contents from .gradle folder from Android Project folder, but this did not help.
I had this problem and deleting the project's .gradle folder didn't fix the problem.
I solved the problem by deleting the C:\Users\<username>\.gradle
folder and restarting my IDE.
The SDK library is no specified, try to set it on configuration
i fixed my issue by invalidating caches, go to file -> invalidate caches / restart
It is also enough to delete only all *.lock files in ~/.gradle folder