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).
Check your Internet Connectivity. Gradle Sync requires a stable internet connection for downloading various versions required for the project online. Hence it is always advised to check your internet connection before syncing your project in Android Studio.
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
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:
and reset Android Studio. When Android Studio resets, activate the HTTPS proxy and sync your Gradle and it will work. ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With