Android studio stuck at Refreshing Gradle project

2020-05-18 04:25发布

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?

enter image description here

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. enter image description here

It failed at the download of the gradle zip :

enter image description here

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.

17条回答
时光不老,我们不散
2楼-- · 2020-05-18 04:34

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~

查看更多
手持菜刀,她持情操
3楼-- · 2020-05-18 04:38

A few things to try in the following order:

  1. Restart the entire PC, then try again...

  2. If that fails then clear the cache for android studio, restart
    android studio and try again..

  3. 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.

查看更多
贪生不怕死
4楼-- · 2020-05-18 04:39

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

查看更多
狗以群分
5楼-- · 2020-05-18 04:41

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.

查看更多
小情绪 Triste *
6楼-- · 2020-05-18 04:43

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.

查看更多
我只想做你的唯一
7楼-- · 2020-05-18 04:44

Turning off my VPN solved this for me.

查看更多
登录 后发表回答