Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] Android Studio – Gradle Sync Connection Timed Out

Posted on November 14, 2022

Solution 1 :

I also faced a very similar thing, I will suggest you to change the jet pack dependency to https://www.jitpack.io

Solution 2 :

So it is finally working.

What was the fix?
Well, a bit hard to say. In the past weeks I’ve been having problems with connecting to some sites via wi-fi, a problem I ignored because I would switch to mobile data and get what I needed.
However I started paying attention when the number of non-reachable sites started increasing and when Netflix stopped playing I had to pay attention. 🙂

I remembered I had tinkered with parental controls on my modem and had left it with some configuration to block certain sites.
So I decided to reset the modem to last working configuration and all of my sites started working again.

When I saw this, I remembered this problem and thought I’d try it again – and it works!!!

What still confuses me is why accessing the gradle site from the browser worked with no problem, but I won’t look this gift horse in the mouth. I’ll take it!

Problem :

I just downloaded Android Studio 4.0.1 and tried to build one of the sample projects.
It fails at the very beginning when trying to do a Gradle sync.

It fails to download https://services.gradle.org/distributions/gradle-5.4.1-all.zip
with the error:
Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
Consult IDE log for more details (Help | Show Log) (

What I find really puzzling is that this seems to be an error that has been plaguing people for a very long time, I have found so many questions on this but not a single answer that is helping me.

READ  [ANSWERED] java - How can I make the interstitial ad appear when the button counter reaches the targeted number?
Powered by Inline Related Posts

Just to be clear on what has been tried so far:

  • I have checked the http proxy settings in File->Settings->http settings. It is set to “No proxy” (as expected, I don’t have a proxy).

  • When I test a connection the one above (https://services.gradle.org) fails. Something simple like www.google.com is ok. More interestingly, I tried another https endpoint and that one failed too. So I don’t know if it’s something https specific

  • my gradle.properties file has no proxy settings (as mentioned, I don’t use a proxy)

  • the services.gradle.org endpoint works absolutely fine from my browser and I’m able to download the file. This I find puzzling, they should both be connecting outside via the same wi-fi modem, shouldn’t they?

  • I have tried restarting my machine, no luck

  • Even more interesting, I created an Ubuntu VM, installed Android Studio there and had none of these issues with the gradle sync failing to connect

Does anybody have any idea what is going on or has managed to crack the code on this after all this time?

EDIT
As I was writing the question above I realised it could be my windows firewall blocking this.
Excited, I rushed off to try it out, completely turned the firewall off, restarted the computer – but still nothing. Gradle syncing is failing in Android Studio while downloading the file works perfectly fine from the browser.

Comments

Comment posted by user3769663

Thanks for the suggestion, much appreciated. Unfortunately, I don’t have any jetpack dependencies defined. I’m really just trying to build one of the sample apps available in Android Studio.

Comment posted by user3769663

I’ve tinkered a bit more and still no luck. Might have to move to my Linux VM – the only reason I didn’t want to do this is because running the emulator on my VM does not really work. But Windows has thrown an unexpected blocking issue so it seems I will have to drop it.

READ  [ANSWERED] android - A/Bitmap: Error, cannot access an invalid/free'd bitmap here! A/brutx.mymodeap: runtime.cc:655] Runtime aborting
Powered by Inline Related Posts

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress