Can't sync Gradle in Android Studio in Iran

ⅰ亾dé卋堺 提交于 2019-12-10 22:25:48

问题


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).


回答1:


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. ;)




回答2:


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



来源:https://stackoverflow.com/questions/39686832/cant-sync-gradle-in-android-studio-in-iran

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!