Android Gradle同步失败问题Android Studio 3.1.4和Gradle 4.4

时间:2018-08-12 12:22:43

标签: android-studio gradle

Gradle同步最终出现以下错误

org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
    at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:96)

AND

org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.

请帮助

enter image description here

1 个答案:

答案 0 :(得分:1)

问题出在我的代理服务器上,我通过此获得了代理详细信息     MenuItem menuItem = menu.findItem(R.id.action_timer); if(menuItem != null){ if(minutes > 0){ menuItem.setTitle(String.format("%s min.", Long.toString(minutes))); } else { menuItem.setTitle(String.format("%s sec.", Long.toString(seconds))); } }

并将这些行放入gradle.properties文件中解决了我的问题

chrome://net-internals/#proxy