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:53

Change gradle home directory to exist location.

查看更多
ゆ 、 Hurt°
3楼-- · 2020-05-18 04:54

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

查看更多
我欲成王,谁敢阻挡
4楼-- · 2020-05-18 04:56

if gradle has downloaded correctly and you just have problem with this project, follow these steps:

  1. Delete .gradle folder from your project's root.
  2. File > Invalidate Caches/restart.

Stucking gradle in adnroid studio

Note: if android studio didn't restarted, kill it's process in Task Manager.

Some other solutions:

  • Adding android studio to Firewall and Antivirus exceptions (or turn off both temporary)
  • Adding mavenCentral() to project build.gradle after jcenter() line.
查看更多
太酷不给撩
5楼-- · 2020-05-18 04:56

In my case it was a wrong path in the file->settings->tools->gardle .. just remove the path then apply.

Then restart android studio (you may need to end task)

查看更多
姐就是有狂的资本
6楼-- · 2020-05-18 04:58

If you are loading existing project into new Android studio then it's gradle library version that you have specified in your top level build.gradle file. Check version and move to latest or compatible version for android studio.

查看更多
登录 后发表回答