android – Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal() error in gradle-ThrowExceptions

Exception or error:

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

Please tell me full solution as I am a complete beginner.
I also do not know how to use 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.)

How to solve:

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 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *