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条回答
Rolldiameter
2楼-- · 2020-05-18 04:46

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.

查看更多
干净又极端
3楼-- · 2020-05-18 04:47

These steps work for me :

  1. Close android studio first
  2. Go to folder C:\Users\.gradle and delete that folder.
  3. Then in gradle folder create gradle.properties file and add following lines.
 org.gradle.daemon=true
 org.gradle.parallel=true
  1. Open android studio
查看更多
我想做一个坏孩纸
4楼-- · 2020-05-18 04:48

As this answer suggests, Removing .gradle directory from home helps solving this problem in some cases.

查看更多
何必那么认真
5楼-- · 2020-05-18 04:48

This happened to me quite a few times and there is no single solution.You should try some of the solutions mentioned below.

  1. File -> Invalidate Caches / Restart
  2. Update Android studio and Gradle to the latest version
  3. Select the correct Gradle distribution by going to Settings/Preferences -> Build,Execution, Deployment -> Gradle and select the path for local Gradle distribution

  4. Restart your computer

查看更多
ら.Afraid
6楼-- · 2020-05-18 04:48

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.

查看更多
趁早两清
7楼-- · 2020-05-18 04:49

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.

查看更多
登录 后发表回答