Cordova下Gradle设置代理Could not resolve all dependencies for configuration classpath

Gradle构建时需要下载各种包,因为公司网络需要设置代理才可以访问外网,所以需要给Gradle设置代理。

在platforms/android创建gradle.properties

文件中写入:

systemProp.http.proxyHost=*.*.*.*
systemProp.http.proxyPort=8080
systemProp.https.proxyHost=*.*.*.*
systemProp.https.proxyPort=8080

然后再执行即可。

发表评论