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.<
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...
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
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.
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.
Very simple solution:
no need to kill Android Studio
, just Kill OpenJdkPlatform
process,
then delete the .lock
file located in:
rootProject/.gradle/<version>/taskHistory
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.