Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
241 views
in Technique[技术] by (71.8m points)

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

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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...