Reputation: 15
I work with Gradle-based projects. Recently I cleared gradle caches and probably did something wrong; since then, on every gradle command I try to use (build, assemble, etc) I immediately receiev an error like:
Gradle could not start your build.
> Cannot create service of type BuildSessionActionExecutor using method LauncherServices$ToolingBuildSessionScopeServices.createActionExecutor() as there is a problem with parameter #21 of type BuildLifecycleAwareVirtualFileSystem.
> Cannot create service of type BuildLifecycleAwareVirtualFileSystem using method VirtualFileSystemServices$GradleUserHomeServices.createVirtualFileSystem() as there is a problem with parameter #1 of type FileWatchingFilter.
> Cannot create service of type FileWatchingFilter using method VirtualFileSystemServices$GradleUserHomeServices.createFileWatchingFilter() as there is a problem with parameter #1 of type GlobalCacheLocations.
> Cannot create service of type GlobalCacheLocations using method GradleUserHomeScopeServices.createGlobalCacheLocations() as there is a problem with parameter #1 of type List<GlobalCache>.
> Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
> Failed to ping owner of lock for journal cache (/Users/<username>/.gradle/caches/journal-1) (lock id: -8062997555051155006, port: 63648)
I could not find a fix, only workarounds. The one that works for me is running find ~/.gradle -type f -name "*.lock" -delete
to clean lock files, then re-running my gradle command. It works, and then the next one usually fails again.
Upvotes: 0
Views: 45