无法创建 DependenciesAccessorsWorkspaceProvider 类型的服务

Could not create service of type DependenciesAccessorsWorkspaceProvider

我在 Mac 中的本地存储已经满了,然后我将我的新工作区移动到外部存储。我尝试签出一个项目并使用新的位置路径构建它(在本例中为 /Volumes/SDMICRO/ANDROID/kotlin-coroutines-master/advanced-coroutines-codelab)。但是在我构建之后出现这个错误。

Gradle could not start your build.
> Could not create service of type DependenciesAccessorsWorkspaceProvider using DependencyManagementBuildSessionScopeServices.createDependenciesAccessorsWorkspace().
   > Timeout waiting to lock dependencies-accessors (/Volumes/SDMICRO/ANDROID/kotlin-coroutines-master/advanced-coroutines-codelab/.gradle/7.0.2/dependencies-accessors). It is currently in use by another Gradle instance.
     Owner PID: unknown
     Our PID: 1857
     Owner Operation: unknown
     Our operation: 
     Lock file: /Volumes/SDMICRO/ANDROID/kotlin-coroutines-master/advanced-coroutines-codelab/.gradle/7.0.2/dependencies-accessors/dependencies-accessors.lock

构建 gradle 文件看起来很奇怪

请帮助我,如何运行 我的项目具有不同的存储位置

你必须去菜单 File > Invalidate Caches / Restart,然后在对话框中点击“Invalidate and Restart” 帮我解决了