2023-06-13

For some reason I have to reboot my Macbook Pro M2 to get gradle to work again

I can work for hours just fine without any issues, then all of the sudden gradle will start getting stuck, eventually it will give this error:

* What went wrong:
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 FileSystemWatchingInformation.
   > Cannot create service of type BuildLifecycleAwareVirtualFileSystem using method VirtualFileSystemServices$GradleUserHomeServices.createVirtualFileSystem() as there is a problem with parameter #7 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().
            > Timeout waiting to lock journal cache (/Users/carlos/.gradle/caches/journal-1). It is currently in use by another Gradle instance.
              Owner PID: 10180
              Our PID: 10277
              Owner Operation:
              Our operation:
              Lock file: /Users/myname/.gradle/caches/journal-1/journal-1.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

I've tried the suggestions of running ./gradlew --stop and rm /Users/myname/.gradle/caches/journal-1/journal-1.lock but it won't help. I've even deleted the entire cache.

The only thing that helps is rebooting the Macbook Pro M2. I've been having this issue several days now.

Any idea what it might be?

I'm using com.android.tools.build:gradle:8.0.2 on Android Studio Flamingo.



No comments:

Post a Comment