4

I'm having problem with Gradle build since 2 days when I am build Gradle.

Error:

Could not HEAD 'https://jitpack.io/com/crashlytics/sdk/android/crashlytics/2.9.7/crashlytics-2.9.7.pom'. Received status code 522 from server: Origin Connection Time-out Enable Gradle 'offline mode' and sync project

Can anyone have any solution for this?

I have tried below commands/steps for the resolved issue:

  • Invalidate catches/Restarts
  • delete .gradle file and try again
  • delete .gradle and .android file from root and try again
  • try with offline sync

But Still not working.

Thanks in advance

Sandip
  • 593
  • 4
  • 20

3 Answers3

6

Issue has been resolve with below solution.

Just add 'www' on Main Gradle file.

 repositories {
    maven { url "https://www.jitpack.io" }

}

Source: https://github.com/jitpack/jitpack.io/issues/3973

Sandip
  • 593
  • 4
  • 20
3

This is issue with jitpack DNS that came up recently. Its described in this issue, along with workaround solutions.

Kuba Pawłowski
  • 365
  • 2
  • 10
  • Hi Kuba. Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. [How to Answer](https://stackoverflow.com/help/how-to-answer). Best Regards. – Elletlar Sep 24 '19 at 08:51
0

Mostly this happens issue of a network problem,

If your network working properly then try with Invalidate catches/Restarts from your file menu

Or then also work then start to work offline
Please follow below command to set your Gradle offline

./gradlew tasks --offline

Or else you can follow steps from bellow answer

Answer for offline gradle

Dhaval Solanki
  • 4,589
  • 1
  • 23
  • 39
  • Turning off gradle repository synchronization is not tackling the real problem. This cannot be even considered as a hackish solution. – Kuba Pawłowski Sep 24 '19 at 07:38