同步gradle时发生以下错误:java
> Could not resolve all dependencies for configuration ':classpath'. > Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.3. Required by: project : > Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.3. > Could not get resource 'https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.3/android-maven-gradle-plugin-1.3.pom'. > Could not GET 'https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.3/android-maven-gradle-plugin-1.3.pom'. > Connect to 127.0.0.1:1080 [/127.0.0.1] failed: Connection refused: connect
缘由:gradle.properties 文件中使用了代理 android
有2个地方须要修改(若是2个地方都存在如下内容,视本身状况而定)git
看到不少博客说删除掉gradle.properties中的代理github
systemProp.https.proxyPort=1080 systemProp.http.proxyHost=127.0.0.1 systemProp.https.proxyHost=127.0.0.1 systemProp.http.proxyPort=1080
我删除工程中gradle.properties里的代理内容,但仍是报上面的错误maven
缘由:还须要删除掉C:\Users\Administrator\.gradle下的gradle.properties中的代理gradle