I got the error when i create a new Project using android studio.
below i attached a screenshots of error message..
In my case, it was sufficient to specify the location of the Gradle distribution included with Android Studio when requested.
On a mac, it was: /Applications/Android Studio.app/Contents/gradle/gradle-2.2.1
On Linux, it can be generalized to {android-studio-root}/grade/gradle-{version}
If you using ubuntu behind a proxy, in my case I'm using ctlm, you must change the jetbrains' proxy setting in /Home/UserName/.AndroidStudioPreview/config/options/other.xml
<option name="USE_HTTP_PROXY" value="true" />
<option name="PROXY_HOST" value="localhost" />
<option name="PROXY_PORT" value="8080" />
This is my configuration I don't need autentificated user.
bests Regards
If Android Studio offers you to choose home folder for gradle, just choose "Use customizable gradle". Then, if you see only gradle files, but no classes and resources - click on "Synchronize gradle" and it will be alrigth. Hope this helps
While importing the project I specified the location of the Gradle distribution.
On Windows 7 it was here:
C:\Program Files\Android-Studio\gradle\gradle-2.2.1
Check your proxy setting for gradle. If it still fails after set the HTTP Proxy in setting menu, you may add gradle.properties
as following.
First, go to the project directory. (By default-for Windows-, projects will be created to {user}\AndroidStudioProjects\{ProjectName}
).
And then create gradle.properties file as below.
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
you can also refer to the User's guide.