It is currently in use by another Gradle instance

前端 未结 27 714
自闭症患者
自闭症患者 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:05

    Remove the lock files in the gradle cache by executing something like this:

    find ~/.gradle -type f -name "*.lock" -delete
    
    0 讨论(0)
  • 2020-12-04 09:05

    I was stuck with this error and had to blow away the contents of my user's .gradle/caches/ folder and the contents of my project's .gradle/ folder to get going again.

    Not sure what caused it, possibly a failed build that kept these files in a locked state?

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

    For Windows machine:

    Open Task Manager(Ctrl-Alt-Delete and check Process)

    -> If you run two instance of android studio, Close One (End Task)

    -> Then close OpenJDK Platform Binary

    -> Gradle sync now on AndroidStudio and it will work now

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

    For MAC machines

    Please open the "Activity Monitor" and select the "memory" option and force quiet the Android studio and other running java processes, it will solve this issue.

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

    For me, on a Mac, select File along top, then choose Invalidate Caches / Restart... done the trick.

    A nice simple solution if it works for you too!

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

    Just kill java.exe process fix my problem.

    -- Edit --

    if not fixed then:

    • kill OpenJdkPlatform proccess.

    if not fixed then:

    • remove all ".lock" file from .gradle directory and sub directories (windows: C:\Users\Username\.gradle).

    if not fixed then:

    • rename or delete .gradle directory and try again.
    0 讨论(0)
提交回复
热议问题