I try to change minSdkVersion
in build.gradle
(Module: app) in Android Studio
and get next error:
Error:Timeout waitin
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
File > Invalidate cache / restart
works for me!!!
Close android studio and delete anything in cache
for me, it solved the problem by killing the PID
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.
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.