Gradle:无法创建FileHasher类型的服务 [英] Gradle :Could not create service of type FileHasher

查看:929
本文介绍了Gradle:无法创建FileHasher类型的服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Gradle构建一个Java项目. 当我运行任何任务(组装,测试)时. 我随机得到一个错误:

I'm using Gradle to build a java project. When I run any task (assemble, test). I get randomly an error :

Could not create service of type FileHasher using 
GradleUserHomeScopeServices.createCachingFileHasher()

有人以前有过同样的问题吗?

Did any one had the same issue before?

V级:3.5

java 8

我正在使用Java插件.

I'm using the java plugin.

谢谢

推荐答案

我面临着同样的问题,因为我在构建过程中不小心按了ctrl + z,然后错误与您的错误相同.

I was facing the same because I accidentally hit ctrl+z during build, and then the error was the same as yours.

我试图删除锁定文件,但无法解决问题.

I tried to remove the lock file but it didn't solve the problem.

然后我发现所有与gradle相关的进程均由ps aux | grep gradle进行,然后全部由kill -9 <pid>进行.构建恢复正常.

Then I find all the process related to gradle by ps aux | grep gradle, and then kill -9 <pid> them all. The build backed to normal.

这篇关于Gradle:无法创建FileHasher类型的服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆