Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
370 views
in Technique[技术] by (71.8m points)

Android studio stuck at Refreshing Gradle project

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.

question from:https://stackoverflow.com/questions/30799712/android-studio-stuck-at-refreshing-gradle-project

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In Android Studio select:
FileSettingsBuild, Execution, DeploymentBuild toolsGradle
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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...