Sebastian Mocanu
Sebastian Mocanu

Reputation: 45

I updated Android Studio and now gradle project sync fails

I updated Android Studio and now I get these errors: 1. Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly. 2. Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Request blocked by Privoxy"

Upvotes: 2

Views: 1380

Answers (4)

Mahdi-Malv
Mahdi-Malv

Reputation: 19200

In my case I was using two proxies at a time (even though I disabled first)

If you have a $HOME/.gradle/gradle.properties files, make sure your proxy matched the content of this file.

then:

  • Prefer a proxy [that bypasses the link giving 403]
  • Or a strong protocol of VPN (Kerio, ...)

(Discovered it by running with --debug option

Upvotes: 0

siva
siva

Reputation: 91

following option solved "Unable to tunnel through proxy. Proxy returns "HTTP/1.1 403 Request blocked by Privoxy" issue

In Android Studio: From the menu bar, click File > Settings (on macOS, click Android Studio > Preferences). In the left pane, click Appearance & Behavior > System Settings > HTTP Proxy. Select No proxy radio button. deleted gradle.properties file in C:/Users/Your User/.gradle folder

Upvotes: 0

user3812423
user3812423

Reputation: 61

I add this line "systemProp.http.nonProxyHosts=*|localhost" in gradle.properties. Works !!!

Upvotes: 6

Mohammad Davari
Mohammad Davari

Reputation: 450

Just 1.close your IDE(Android Studio) 2.delete .gradle folder in C:/Users/Your User.gradle in Windows and 3.open your IDE and enjoy

Updated: 2020/04/21

this problem could be fixed by delete gradle.properties file in C:/Users/Your User/.gradle folder

Upvotes: 0

Related Questions