同步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