I am facing this issue while building flutter
apps in VS Code
and I could not find any simple solution for this issue. Please help me resolve this issue.
FAILURE: Build failed with an exception.
What went wrong:
Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal(). Timeout waiting to lock journal cache (/home/jatin/.gradle/caches/journal-1). It is currently in use by another Gradle instance. Owner PID: 3813 Our PID: 5034 Owner Operation: Our operation: Lock file: /home/jatin/.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
BUILD FAILED in 1m 2s
Running Gradle task ‘assembleDebug’…
Running Gradle task ‘assembleDebug’… Done 63.5s
Gradle task assembleDebug failed with exit code 1
A detailed solution would be appreciated.
Also, I am unaware of the stacktrace
option .(* 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.)
Had the same problem, these actions worked for me: Close IDE. Go to windows task manager -> processes. Find java.exe processes there and end them.
Hope this helps :)
I had the same problem but thankfully I found a way to do it without restarting the container. Ran the following command to stop daemons on Gradle. This made the other daemon stop and blocking my Gradle runs
./gradlew --stop
OR
gradle --stop
That Gradle failure message would be:
Gradle sync failed: Timeout waiting to lock daemon addresses registry [...].
It is currently in use by another Gradle instance.
Owner PID: 4567
Our PID: 5678
Owner Operation: ...
If you're using macOS or linux for development, just kill the owner process:
sudo kill -9 4567
I had the same problem when interrupting a batch file that was calling individual groovy scripts like
os.system('./gradlew chromeTest --tests=\"MyTestScript_1\")
The batch file contains several calls like the one above, and I interrupted it due to errors in my scripts. Once the errors were corrected, I tried again to run the batch file but then I got the error reported in this ticket.
To solve it I tried to stop gradle with
./gradlew --stop
or
gradle --stop
and then restarting gradle with
./gradlew --daemon
But when executing again my batch file I still got the same error message. The only way I was able to make it work again was rebooting my container. Heavy handed but it worked. I would like to know a better way!.
I had the same issue, i run the following command and it worked for me,
find ~/.gradle -type f -name "*.lock" -delete
My solution was to downgrade the gradle version from 6.8.2 to 6.7.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With