28

I can't build my android project due to this error. Gradle failed to GET https://www.jitpack.io/com/github/Raizlabs/DBFlow/dbflow/3.1.1/dbflow-3.1.1.pom . Strange enough I am able to view the pom file behind this URL in my browser. What might be the problem here?

My gradle.properties look like this:

systemProp.http.proxyHost=myproxy.local
systemProp.http.proxyPort=3210
systemProp.https.proxyHost=myproxy.local
systemProp.https.proxyPort=3210
systemProp.http.proxyUser=usr
systemProp.http.proxyPassword=pwd

When I remove the proxyUser/Password I get an 407 Proxy Authentication Required.

Beloo
  • 9,723
  • 7
  • 40
  • 71
Chriss
  • 5,157
  • 7
  • 41
  • 75

8 Answers8

7

For me this worked 1. Invalidate caches/restart 2. Sync project with gradle files

Jeremiah Polo
  • 641
  • 5
  • 10
2

Check the local 'gradle.properties'. My problem was on there. Somehow there was some proxy informations and they was wrong. I deleted it and problem solved.

0

Your proxy needs authentication and the authentication you supply is invalid or your proxy does not allow to request that URL with the authentication details you supply.

Vampire
  • 35,631
  • 4
  • 76
  • 102
  • 2
    Proxy auth works.I wonder why I get an 403 Forbidden with gradle, sametime my browser can access the URL. – Chriss Sep 04 '17 at 15:02
  • I guess your browser is configured differently. Either without proxy or with differing credentials I'd guess. Maybe install Wireshark and look at the network traffic to find the difference. – Vampire Sep 04 '17 at 16:59
0

You've only provided user/password for systemProp.http. You likely need to provide the same for systemProp.https

See accessing the web via proxy

lance-java
  • 25,497
  • 4
  • 59
  • 101
0

You need to reset android studio because we cannot get the sever response due to proxy matters. Close Android Studio. Please Go to C://Users/Username/. Then delete .gradle file and .Android Studio File. After Open Android Studio and set settings. I solved this problem using above steps.

0

check gradle offline mode under settings and check local gradle then specify the path of you gradle.zip file its under

0

Upgrading to Android X can fix the Forbidden! response problem.

  • Open your project on Android Studio
  • Top menu > Refactor > Migrate to AndroidX
  • Don't forget backup your entire project before migrating.
Reza Roshan
  • 147
  • 3
  • 7
0

Late answer, but useful, i suppose. I realised that it is not allowed to read jitpack artifacts from a private repository without having a paid subscription: https://jitpack.io/private

So that's might be a cause for 403 error. You have an option either upgrade or make the repository public Subscription must be bought for the repository's owner account.

Beloo
  • 9,723
  • 7
  • 40
  • 71