Gradle Build Error on Android Studio 3.1.3: The server failed to respond with a valid HTTP response

懵懂的女人 提交于 2020-01-17 15:24:47

问题


in Android Studio 3.1.3 Gradle Build Get below error , How I can Fix That?

 Gradle sync failed: 
Could not resolve all dependencies for 
configuration ':wear:debugRuntimeClasspath'.
Could not determine artifacts for com.android.support:recyclerview-v7:28.0.0-alpha3
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/recyclerview-v7/28.0.0-alpha3/recyclerview-v7-28.0.0-alpha3.aar'.
Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/support/recyclerview-v7/28.0.0-alpha3/recyclerview-v7-28.0.0-alpha3.aar'.

The server failed to respond with a valid HTTP response

When I use manual proxy on setting >> HTTP Proxy, it doesn't work, and I get the following error:

Unable to resolve dependency for ':mobile@debug/compileClasspath': Could        not resolve com.android.support.constraint:constraint-layout:1.1.2.

回答1:


The problems you're facing are probably caused by your ISP or country of origin due to the blockage of the domains that are needed to download those libraries.

If you live in Iran to download this new library you must connect to VPN first.

Do not forget change the Proxy Setting of Android Studio to use the VPN and after that retry the operation.



来源:https://stackoverflow.com/questions/51039946/gradle-build-error-on-android-studio-3-1-3-the-server-failed-to-respond-with-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!