1 year ago

#72293

test-img

Vitalii Suslin

How to resolve gradle timeout waiting to lock file on MacOS m1?

I'm using Android Studio 2020.3.1 Patch 4(at 01-19-2022), Gradle 7.0.2. Java 11 Kotlin 1.6.10, mac Pro 16 m1 arm64(2021)

I'm new in macOS, jumped from Ubuntu, and found issues. I'm working with different projects and all time when I'm trying to switch to another one, I have the next error:

Gradle could not start your build.
Could not create service of type ResourceSnapshotterCacheService using 
GradleUserHomeServices.createResourceSnapshotterCacheService(). Timeout waiting to lock file hash cache

It sometimes happens when I'm trying to run or sync the same project.

Solution as find ~/.gradle -type f -name "*.lock" -delete not useful because I run it all time when I complete changes on sdk project and test it on another one. Relevant solutions like kill not useful too

I hope, somebody has a solution for that. Thank you :)

Error text:

Gradle could not start your build.

Could not create service of type ResourceSnapshotterCacheService using GradleUserHomeServices.createResourceSnapshotterCacheService(). Timeout waiting to lock file hash cache (/Users/{user}/.gradle/caches/7.0.2/fileHashes). It is currently in use by another Gradle instance. Owner PID: 73387 Our PID: 73419 Owner Operation: Our operation: Lock file: /Users/{user}/.gradle/caches/7.0.2/fileHashes/fileHashes.lock

android

macos

android-studio

gradle

apple-m1

0 Answers

Your Answer

Accepted video resources