Reputation: 1
A problem occurred configuring root project 'android'. Could not resolve all dependencies for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:1.0.0+. Required by: :android:unspecified
Failed to list versions for com.android.tools.build:gradle.
Unable to load Maven meta-data from https:.,.,.//repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
Connection to https:...,//repo1.maven.org refused
This is my error message.
It seems that it is not accessible to the central warehouse, but I have set up proxy for gradle, why?
Upvotes: 0
Views: 443
Reputation: 1
I have already resolved my problem. find your .gradle folder,Open the gradle.properties file,and write down
#systemProp.http.proxyHost=www.somehost.org
#systemProp.http.proxyPort=8080
#systemProp.http.proxyUser=userid
#systemProp.http.proxyPassword=password
#systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
#
#systemProp.https.proxyHost=www.somehost.org
#systemProp.https.proxyPort=8080
#systemProp.https.proxyUser=userid
#systemProp.https.proxyPassword=password
#systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
Because it's the beginning of https,you must set it,not only http
Upvotes: 0