简体   繁体   中英

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

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´sa 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.

使用默认的gradle包装并从我的公司网络断开连接到4G网络解决了我的问题

文件>设置>构建,执行,部署> Gradle>并检查脱机工作

If you have an failed for sync gradle. Such as; Gradle sync failed: Minimum supported Gradle version is 3.3. Current version is 3.2.

  1. Download Gradle supported version manually.
  2. Uncheck "Use default gradle wrapper (recommended)"
  3. Check "Use local gradle distribution" and set Gradle home path.
  4. Check offline work.

Updating the gradle path in

File > Settings > Build, Execution, Deployment > Gradle

worked for me. The problem occured after updating Android Studio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM