Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio 2.3 refreshing gradle project taking forever

I updated my android studio to the new version 2.3 and was asked to convert my project to match the new formats which I did. I was asked to update the gradle version too and I did. Now one eternity later it's still refreshing my project gradle. I've restarted it several times and I have active internet connection. Any suggestions

like image 814
Norris Boateng Avatar asked Mar 03 '17 14:03

Norris Boateng


People also ask

Why does Gradle project take so long to sync?

Check your Internet connection. If internet speed is very slow gradle build will also take long time to build. I check by change my wifi internet connection with another one good speed connection. Now build time is normal.

How long does a Gradle sync take?

One bit of a downside is that it takes roughly 3 minutes to re-sync when we "Import Gradle Project".

How long does it take to import Gradle project in Android Studio?

Importing/re-importing a Gradle project in IntelliJ takes about 10 mins for me. This is a very small project with few dependencies.


3 Answers

This method works for Me :

Change Gradle Home Path as C:\Program Files\Android\Android Studio\gradle\gradle-3.2

To Open Gradle Home Setting :

Settings->Build,Execution,Deployment->Gradle->Gradle Home

Screen Shot

like image 148
RAJESH KUMAR ARUMUGAM Avatar answered Oct 22 '22 21:10

RAJESH KUMAR ARUMUGAM


It depends sometimes on what are you building. As Hamid said, it´s a must do working Offline, it greatly reduces times, or at least it did not that long ago.

Also checkout that you are not building google APIs that you are not using, be careful with google's play-services or maps, they sometimes take a bunch of time and maybe you are not using them.

If that's an option, install Android Studio in a SSD, don't buy one, but if you have it, consider moving it, it reduced my gradle about 90%.

Also, check this, a bit old, but may help.

like image 43
Mese Avatar answered Oct 22 '22 20:10

Mese


Could be caused by Microsoft Defender. Check if msmpeng.exe is running in task manager and exclude Android directory.

like image 35
Macallan Avatar answered Oct 22 '22 21:10

Macallan