Updated Android studio to 1.2.2 and the background process wont end.(Refreshing \'MemoryCards\' Gradle project).
It has been more than an hour now and its still busy?
In Android Studio select:
File\Settings\Build, Execution, Deployment\Build tools\Gradle
click on the button on the right side showing local gradle distribution path.
you will be taken to the gradle folder.
click ok in this dialog box and your path will be updated!
restart android studio and you are good to go!
The Problem:
in my case path selected after the update was of older version e.g:
C:/Program Files/Android/Android Studio/gradle/gradle-2.4
However, after the update it was changed to:
C:/Program Files/Android/Android Studio/gradle/gradle-2.8
P.S:
This solution also resolves following error:
buildTypes cannot be applied to groovy.lang.Closure
In my case, I download Gradle zip from the web site, and set the gradle local home, enabled offline work. Then "file" menu -> restart. It worked for me.
Change gradle home directory to exist location.
Answer of Lloric is the perfect answer.
Go to Settings > Build Tools > Gradle
Then change the Gradle Home
path to the existing path.
Probably you are facing problem now with gradle-2.10
Browse directory, you will find out gradle-2.14.1
as of mine or later versions.
Change it to that then rebuild your project.
If you get a connection timed out error this is usually a problem of proxies. Try disabling them if you are using proxies.
Also, when gradle is stuck, deleting the .gradle
folder in c:\Users\
always helped me.
A few things to try in the following order:
Restart the entire PC, then try again...
If that fails then clear the cache for android studio, restart
android studio and try again..
Disable any proxies on your PC / network / Android studio then try again
If that doesn't work then look at clearing the gradle files and re-downloading them. Let me know how this goes please and I can update my answer with further things to do if needed.