无法使用 BuildSessionScopeServices.createChecksumService() 创建 ChecksumService 类型的服务

Emi*_*mov 8 gradle

我是 gradle 新手,当我尝试简单检查 gradle 内置任务时,出现“构建失败”错误。

谁能解释一下出了什么问题吗?

我只在 cmd 上运行“gradle 任务”并收到下一个错误:

    FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type ChecksumService using BuildSessionScopeServices.createChecksumService().
   > Timeout waiting to lock checksums cache (M:\.gradle\checksums). It is currently in use by another Gradle instance.
     Owner PID: unknown
     Our PID: 14372
     Owner Operation: unknown
     Our operation:
     Lock file: M:\.gradle\checksums\checksums.lock

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with
--scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 1s
Run Code Online (Sandbox Code Playgroud)

Gab*_*bor 14

./gradlew --stop因为当 gradle 没有完全关闭时会发生错误。如:Cannot lock checksums cache (/Users/.../StudioProjects/android/.gradle/7.4.2/checksums) as it has already been locked by this process.


小智 -2

只需重新启动您的机器即可。这是一个与缓存相关的错误