Android Studio 3.1.3 上的 Gradle 构建错误:服务器无法使用有效的 HTTP 响应进行响应



in Android Studio 3.1.3 Gradle Build 得到下面的错误,我该如何解决这个问题?

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

当我在设置HTTP代理时使用手动代理>>它不起作用,并且出现以下错误:

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

您面临的问题可能是由您的 ISP 或原籍国引起的,因为下载这些库所需的域被阻止。

如果您居住在伊朗要下载此新库,则必须先连接到VPN。

不要忘记更改Android Studio的代理设置以使用VPN,然后重试该操作。

最新更新