简体   繁体   中英

Cordova build: Command failed with exit code 8

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM