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
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.
One bit of a downside is that it takes roughly 3 minutes to re-sync when we "Import Gradle Project".
Importing/re-importing a Gradle project in IntelliJ takes about 10 mins for me. This is a very small project with few dependencies.
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
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.
Could be caused by Microsoft Defender. Check if msmpeng.exe is running in task manager and exclude Android directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With