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?
Is this normal and why is it taking this long? its a small app.
Here is my idea.log : https://www.dropbox.com/s/syf12m3lxbww5k7/idea.log?dl=0
Update:
Disabled my proxy settings in android studio and the refreshing process continued and showed me the following.
It failed at the download of the gradle zip :
So the reason I think that It takes this long it was trying to download the gradle zip file +- 60 Mb and my internet connection is slow...
So the process continues when I disable the proxy settings but then it cant download the gradle zip file... ? so it fails again.
Update :
I used another Internet source and it downloaded the gradle and the process continued.
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
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.
As this answer suggests, Removing .gradle directory from home helps solving this problem in some cases.
Change gradle home directory to exist location.
I run into this problem on Windows 7 after an update of the Android studio and this works for me:
Run the Android Studio with Administrative Privileges.
I had the same issue. I just updated my android studio to 2.0 on ubuntu 14.04. This issue arose for one of the project and it was solved through a answer here which seems unrelated to this problem !!
If you are using Android Studio 2.0 Beta, this issue might appear (more likely if you are working on NTFS filesystem) and it seems like the "Instant Run" is the culprit. Search for "Instant Run" in settings and uncheck the box
Posting here to an old question - maybe somebody else might me stuck on this aswell.
This happened to me quite a few times and there is no single solution.You should try some of the solutions mentioned below.
File -> Invalidate Caches / Restart
Select the correct Gradle distribution by going to Settings/Preferences -> Build,Execution, Deployment -> Gradle
and select the path for local Gradle distribution
Restart your computer
These steps work for me :
org.gradle.daemon=true org.gradle.parallel=true
Turning off my VPN solved this for me.
You can reverse to Android Studio 1.4, then the project works.....
And when I update it to 1.5, the project start stucking with refreshing >_<
Might not help, but worth a try~
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.
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.
if gradle has downloaded correctly and you just have problem with this project, follow these steps:
Note: if android studio didn't restarted, kill it's process in Task Manager.
Some other solutions:
In your terminal try :
gradlew clean
Then invalidate caches and its works... It will redownload all libraries from internet and build successfully You can also delete build,.gradle,gradle folders to force re-cleaning
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With