title: Android Studio Gradle Connection refused: connect
body: <p>I installed Andorid Studio and the first time I started a new project. 
  at compile time I got this error: "Connection refused: connect"</p>
  
  <p>I tried to set proxy and I also tried to use local gradle, but it didn't help.</p>
  
  <pre><code>org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'MyApplication2'.
  [...]
  Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.
  [...]
  Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.3.1.
  Required by:
      project :
  [...]
  Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.android.tools.build:gradle:3.3.1.
  [...]
  Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom'.
  [...]e
  Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom'.
  [...]
  Caused by: org.apache.http.conn.HttpHostConnectException: Connect to xx.xxx.xx.xx:8080 [/xx.xxx.xx.xx] failed: Connection refused: connect
  [...]
  Caused by: java.net.ConnectException: Connection refused: connect
  [...]   
  </code></pre>