there is a Gradle sync error message that has been plaguing two of my coworkers’ Android Studios. They are both running macOS and the latest Android Studio.
Gradle sync fails with this error every time:
12:06 PM Gradle sync failed: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'. (3 m 41 s 707 ms)
12:06 PM Project [project-name] is using the following JDK location when running Gradle:
/Applications/Android Studio.app/Contents/jre/Contents/Home
Using different JDK locations on different processes might cause Gradle to
spawn multiple daemons, for example, by executing Gradle tasks from a terminal
while using Android Studio.
More info...
Select a JDK
Do not show this warning again
The Gradle ZIP file downloads successfully, but after unpacking, they always end up with that error.
I’ve had them try a bunch of things including:
- Uninstalling SDKMAN
- Changing the Gradle JDK to “Android Studio default JDK” and other options
- Reinstalling Android Studio
- Running “Invalidate Caches…”
- Deleting the .gradle folders from both the project root and the macOS user folder
Nothing we’ve tried seems to fix it. At our work, we have some really obnoxious network filtering software that has caused problems for us trying to download dependencies, but it’s working on my computer, and not on theirs. I’m running out of ideas…