It is currently in use by another Gradle instance

前端 未结 27 716
自闭症患者
自闭症患者 2020-12-04 08:14

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.<

相关标签:
27条回答
  • 2020-12-04 09:00

    Sometimes fast way comes in a non-elegant deal, there we go:

    Find first the # of all gradle process running on

    ps -A | grep gradle
    

    After that, get the IDs, Kill 'em all one by one

    sudo kill -9 <process ID>
    

    Now you're good ;-)

    0 讨论(0)
  • 2020-12-04 09:01

    Its Work for me for Problem:-

    "Error:Timeout waiting to lock jars It is currently in use by another Gradle instance. Owner PID: 6896 Our PID: 5048 Owner Operation: Our operation: Lock"

    Solution:-

    1. close the Android Studio and Open Task manager and end the process java.exe
    2. open the derectory ....gradle\caches.
    3. Delete the jar2.lock file.
    4. Open android Studion and clean the project.
    0 讨论(0)
  • 2020-12-04 09:02

    That Gradle failure message is usually followed by the relevant process IDs, so it would be

    Gradle sync failed: Timeout waiting to lock daemon addresses registry [...].
    It is currently in use by another Gradle instance.
    
    Owner PID: 1234
    Our PID: 5678
    Owner Operation: ...
    

    In order to unlock, just kill the owner process:

    sudo kill -9 1234
    
    0 讨论(0)
  • 2020-12-04 09:03

    Having the same issue on a Mac, none of the above worked for me. What worked , though, was opening the Activity Monitor and closing a running java process. I also noticed that an .hprof file was generated, which I deleted. After that, I ran my project and it worked.

    0 讨论(0)
  • 2020-12-04 09:04

    open terminal and move to project path then run depending on the operation system: gradlew clean or ./gradlew clean

    0 讨论(0)
  • 2020-12-04 09:04

    I was too stuck with the same thing. But it was sorted soon. Just delete the file:

    D:\.gradle\daemon\6.1.1\registry.bin.lock

    also, I've ended OpenJDK from task manager. Idk it helped or not but both of them solved the problem.

    0 讨论(0)
提交回复
热议问题