I was facing the same issue, and I tried using ./gradlew --stop
, but that didn’t work for me.
What eventually fixed it was removing the .gradle
folder in my project directory (or the global .gradle
folder). After deleting it, the lock error was resolved, and I could run any gradle command without any issues.