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

6
  • Go To Studio Preference--> GRadle--> then disable offline work and apply Commented Sep 24, 2019 at 5:34
  • 1
    please add your gradle contents. Commented Sep 24, 2019 at 5:34
  • @KishanMaurya I have tried but not working Commented Sep 24, 2019 at 5:40
  • Check you internet connection may be it's not working. Commented Sep 24, 2019 at 5:54
  • @AnasMehar Internet working properly. Commented Sep 24, 2019 at 6:13

3 Answers 3

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

Sign up to request clarification or add additional context in comments.

Comments

3

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

1 Comment

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. Best Regards.
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

1 Comment

Turning off gradle repository synchronization is not tackling the real problem. This cannot be even considered as a hackish solution.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.