Gradle 构建异常信息:
Gradle could not start your build.
> Cannot create service of type BuildTreeActionExecutor using method LauncherServices$ToolingBuildTreeScopeServices.createActionExecutor() as there is a problem with parameter #1 of type List<BuildActionRunner>.
> Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
> Timeout waiting to lock journal cache (D:\Gradle\gradle - 7.2\caches\journal-1). It is currently in use by another Gradle instance.
Owner PID: 42164
Our PID: 48372
Owner Operation:
Our operation:
Lock file: D:\Gradle\gradle - 7.2\caches\journal-1\journal-1.lock
Gradle 异常分析:
1 首先分析该异常是因为进程占用(根据报错信息)
解决途径:kill 原线程
· 控制面板 JPS 命令查询显示的占用线程是否存在
· 若存在则通过 kill 命令杀死线程并重新构建任务
2 若通过 JPS 命令查询发现占用线程不存在,则删除下图中的锁文件并重新构建项目