Can't sync Gradle in Android Studio in Iran
Asked Answered
H

5

5

I use Android Studio version 1.5.1, and I'm trying to compile 'com.android.volley:volley:1.0.0' in build.gradle, but I can't sync Gradle. I think this error is because of my Internet connection or access being blocked from my country (Iran).

Higgledypiggledy answered 25/9, 2016 at 12:30 Comment(0)
H
5

Yes, it's because Google has been blocked in Iran since 2012. You can use a proxy app like Shadowsocks to change your country.

After activating your proxy app, in Android Studio go to file->setting->Appearance & Behavior->System Setting->HTTP Proxy active 'Manual proxy configuration'

and set:

  • host name:127.0.0.1 (for example)
  • port name:1080 (for example)

and reset Android Studio. When Android Studio resets, activate the HTTPS proxy and sync your Gradle and it will work. ;)

Higgledypiggledy answered 25/9, 2016 at 12:39 Comment(1)
Google has blocked Iran. It's not blocked.Hollandia
M
5

Certainly Google as an american company has to obey US foreign policies. Google has too many services, among them those which relate to developers are blocked. There are many ways to work around these bans using proxies and VPNs but i personally wish for changes to happen between Iran and US.

Matelda answered 16/2, 2020 at 20:12 Comment(0)
D
0

you have to install any connect and set cisco username and password and restart android studio

Duro answered 9/10, 2017 at 8:26 Comment(0)
S
0

Put this info in your Android Studio proxy settings:

address: fodev.org
port:8118

Put these lines on gradle.properties file in your project:

systemProp.http.proxyHost=fodev.org
systemProp.http.proxyPort=8118
systemProp.https.proxyHost=fodev.org
systemProp.https.proxyPort=8118

enter image description here

For more information see this repository: https://github.com/freedomofdevelopers/fod

Shakti answered 11/10, 2022 at 21:6 Comment(2)
Thanks, but it is asking for a username and password. I can't find that anywhere.Forwardness
@Forwardness please go to the repository and open an Issue because this proxy server is under update. and if you use vpn, turn it off and test again...Shakti
B
0

i set my locatin server to US in pshiphone and work it

and you can use another applications like

403 dns changer https://403.online

oblivion VPN https://github.com/bepass-org/oblivion-desktop

Besought answered 11/10 at 9:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.