问题
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