It is currently in use by another Gradle instance

前端 未结 27 713
自闭症患者
自闭症患者 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 08:47

    I was facing same issue in my project but i resolved this by invalidate project, so follow these steps in android studio File -> Invalidate Caches / Restart...

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

    everyone finally, I have complete solution

    Error :- Timeout Gradle cashe its running in other gradle
    
    
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    
    Please add this Line in Wrapper.Propertis and Sync now
    After Sync the project When 
    Invalidthcast\restart   to get the requesting componants
    
    0 讨论(0)
  • 2020-12-04 08:49

    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.

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

    press CTRL + SHIFT + ESC to open task manager now find OpenJDK and kill it goto where the error is pointing to like

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

    delete the file and resynce and you're good to go.

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

    Very simple solution:

    no need to kill Android Studio , just Kill OpenJdkPlatform process, then delete the .lock file located in:

    rootProject/.gradle/<version>/taskHistory
    
    0 讨论(0)
  • 2020-12-04 08:55

    It was not necessary for me to remove any files to fix this error.

    The issue I had is that Gradle instances had hung and were 6 command prompt entries in my task list that were spawned by Java.

    Forcing the command prompt instances to close allowed me to continue work as usual.

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