I'm new to Gradle build system. I want to do some basic functions on it. I'm running/building it in command line. I am referring User guide. And, doing some simple tasks.
When I start to run simple tasks, it was build successfully. But, After some times, it is showing "It is currently in use by another Gradle instance"
and becomes BUILD FAILED
. I'm using a terminal for run the task. I didn't run anything at that time.
If I closed the terminal which generate the error, this problem would be solved. But, I know that it is not the solution for that.
Why is this error coming frequently?
How to solve it?
And, Please refer any link to improve my knowledge on Gradle Build system in Android.
For Windows OS:
I figured it had something to do with a lock file so i simply went to .gradle\buildOutputCleanup in the project folder and deleted the cache.properties.lock file and rebuilt the project. It was working perfectly.
open terminal and move to project path then run depending on the operation system: gradlew clean or ./gradlew clean
everyone finally, I have complete solution
I had the same issue on mac:
take care, that your project is NOT on an external hard disk. The location of your project must be on the hard disk with your operating system.
(Building an Ionic app)
Remove the lock files in the gradle cache by executing something like this:
Just kill java.exe process fix my problem.
-- Edit --
if not fixed then:
if not fixed then:
if not fixed then: