title: Error when building a Cordova Android project
body: <p>Hi i'm trying to build a cordova project with android plugin in windows 7 with 
  the following environment</p>
  
  <pre><code>ANDROID_HOME=D:\DevTools\Android\Android_SDK_NDK\android-sdk
  JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45
  </code></pre>
  
  <p>i generated a cordova project </p>
  
  <pre><code>&gt;cordova create CordovaProject io.xyz.hellocordova CordovaApp
  </code></pre>
  
  <p>and added the android plugin </p>
  
  <pre><code>&gt;cordova platform add android
  </code></pre>
  
  <p>now after doing that i tried to build the android project </p>
  
  <pre><code>&gt;cordova build android
  </code></pre>
  
  <p>this trying to download <strong>gradle-2.2.1-all.zip</strong> which leads to exception as </p>
  
  <pre><code>E:\Cordova\Workspace\HelloCordova&gt;cordova build android --verbose
  Executing "before_build"  hook for all plugins.
  Executing "before_prepare"  hook for all plugins.
  Searching PlatformJson files for differences between project vs. platform instal
  led plugins
  No differences found between project and android platform. Continuing...
  Generating config.xml from defaults for platform "android"
  Wrote out Android application name to "HelloCordova"
  Wrote out Android package name to "com.gowtham.HelloCordova"
  This app does not have launcher icons defined
  updated project successfully
  Executing "after_prepare"  hook for all plugins.
  Executing "before_compile"  hook for all plugins.
  ANDROID_HOME=D:\DevTools\Android\Android_SDK_NDK\android-sdk
  JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45
  Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip
  
  Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException
  : Connection timed out: connect
          at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
  essManager.java:78)
          at org.gradle.wrapper.Install.createDist(Install.java:47)
          at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
          at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
  Caused by: java.net.ConnectException: Connection timed out: connect
          at java.net.DualStackPlainSocketImpl.connect0(Native Method)
          at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI
  mpl.java:79)
          at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
  va:339)
          at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
  Impl.java:200)
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
  :182)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
          at java.net.Socket.connect(Socket.java:579)
          at java.net.Socket.connect(Socket.java:528)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
          at sun.net.www.http.HttpClient.&lt;init&gt;(HttpClient.java:211)
          at sun.net.www.http.HttpClient.New(HttpClient.java:308)
          at sun.net.www.http.HttpClient.New(HttpClient.java:326)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
  onnection.java:996)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
  ction.java:932)
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
  .java:850)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
  nection.java:1300)
          at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
          at org.gradle.wrapper.Download.download(Download.java:45)
          at org.gradle.wrapper.Install$1.call(Install.java:60)
          at org.gradle.wrapper.Install$1.call(Install.java:47)
          at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
  essManager.java:65)
          ... 3 more
  Error: Error code 1 for command: cmd with args: /s,/c,"E:\Cordova\Workspace\Hell
  oCordova\platforms\android\gradlew cdvBuildDebug -b E:\Cordova\Workspace\HelloCo
  rdova\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDepre
  catedNdk=true"
  
  E:\Cordova\Workspace\HelloCordova&gt;gradle -version
  
  ------------------------------------------------------------
  Gradle 2.2.1
  ------------------------------------------------------------
  
  Build time:   2014-11-24 09:45:35 UTC
  Build number: none
  Revision:     6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a
  
  Groovy:       2.3.6
  Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
  JVM:          1.7.0_45 (Oracle Corporation 24.45-b08)
  OS:           Windows 7 6.1 x86
  </code></pre>
  
  <p>may be this was due to my office firewall/proxy which is not allowing to download the zip file. but i have the zip file extracted and set the path variable as</p>
  
  <blockquote>
    <p>GRADLE_HOME = C:\gradle-2.2.1</p>
  </blockquote>
  
  <p>even that also i'm not able to resolve this issue. I understand that the env. path variable is not accepted in build script but i'm not sure where to change or by-pass this step.</p>