Error:Timeout waiting to lock buildscript class cache for build file when change minSdkVersion

后端 未结 15 1703
不知归路
不知归路 2020-12-05 08:55

I try to change minSdkVersion in build.gradle (Module: app) in Android Studio and get next error:

Error:Timeout waitin         


        
相关标签:
15条回答
  • 2020-12-05 09:30

    1.Check whether multiple instance of java.exe running then find out why they are running in my case i have opened command prompt it need java instance. open task manager and end task of cmd.exe If you don't want it to further happen remove path from environment variables and use embedded android studio JDK.

    2.Delete lock file in /.gradle/cache goto task manager and close all instance of java.exe In android studio click on file invalidate caches/restart

    0 讨论(0)
  • 2020-12-05 09:33

    File > Invalidate cache / restart

    works for me!!!

    0 讨论(0)
  • 2020-12-05 09:35

    Close android studio and delete anything in cache

    0 讨论(0)
  • 2020-12-05 09:40

    for me, it solved the problem by killing the PID

    • Windows taskkill /F /PID pid_number
    • Linux kill -9 pid_number
    0 讨论(0)
  • 2020-12-05 09:40

    Issue: If you open two Android Studios, and two of them are using Camera Services to capture image then we you face this issue.

    Solution: Close One Android Studio.

    0 讨论(0)
  • 2020-12-05 09:42

    This sounds like it's related to https://issues.gradle.org/browse/GRADLE-2795.

    The easiest way to solve this will be to delete everything under C:\Users\Administrator\.gradle\caches. There is a cache.properties.lock that is holding a global lock which is preventing you from running your script.

    For Mac OSX the folder is located in ~/.gradle/caches. The Android Studio should show the proper path to the file which is causing the lock anyway.

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