Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio connection reset error

I've downloaded a sample project (TimePicker-master) weeks ago from GitHub and since then when ever I try to sync that project i get this error. Gradle 'TimePicker-master'project refresh failed Error: Connection reset

enter image description here

i have tried different proxies but it did not work. because i don't know what the problem even is? and i didn't found the reason searching online now i get the same problem when i try to download intelliJ plugins while I'm using proxies. what is the problem and how do i solve it ?(be friendly and helpful to beginners)

like image 789
alireza easazade Avatar asked Apr 20 '17 06:04

alireza easazade


People also ask

How to reset Android Studio?

Steps to Reset Android Studio 1 Step 1: Got to users directory in system drive#N#First-of-all you need to go to your user’s directory in system drive,... 2 Step 2: Delete .AndroidStudio directory#N#You need to delete .AndroidStudio directory in order to reset your Android... 3 Step 3: Setting up the Android Studio More ...

What is an err_connection_reset error?

Connection reset errors appear when you visit a website, and the browser fails to establish a connection. When that happens, the connection is “reset,” which means the server cannot transmit data to your browser. Here’s what the “ERR_CONNECTION_RESET” message looks like in Chrome:

How to set up Android Studio?

You need to follow the below steps to set up your android studio. When you open your Android Studio it will ask you to import your previous version. If you have the backup you can import it. Otherwise, you need to choose the second option “Do no import settings” and click ok. After that you will come to “ Welcome Screen “, click next.

How to make a backup of Android Studio Settings?

It is recommended to make a backup of your android studio settings and projects before reset. First-of-all you need to go to your user’s directory in system drive, which is generally ‘C-drive’.


2 Answers

the problem is not with gradle. the problem is that gradle cannot connect to the bintray servers. bintray has blocked some countries from accessing their servers .and because of that gradle cannot retrieve libraries it needs to build the project and run the application. so what do we do?

changing the IP address will do the trick.

now a word of advice to those who are new to android programming or programming in general. do not waste your time on free VPN servers or proxies which has a lot of issues like connection failure, low speed and etc . just buy a premium account from a good service and use that. it'll worth it.

like this one:

enter image description here

another advice is sometimes using protocols like Stunnel and cisco might still cause problems like connection timeout errors but vpn and kerio will always work ok

like image 185
alireza easazade Avatar answered Oct 14 '22 03:10

alireza easazade


Open timepicker-library's gradle file and remove below code from it and try to sync project again.

apply plugin: 'bintray-release'

dependencies {
    classpath 'com.novoda:bintray-release:0.3.4'
}

publish {
    userOrg = 'erz05'
    groupId = 'com.github.erz05'
    artifactId = 'TimePicker'
    version = '0.1.5'
    description = 'Android Library for TimePicker View'
    website = 'https://github.com/erz05/TimePicker'
}

Hope this will help you.

like image 1
bhaumiksoni Avatar answered Oct 14 '22 03:10

bhaumiksoni