0

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?

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.