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.
答案 0 :(得分:1)
您面临的问题可能是由于ISP或原籍国造成的,因为下载这些库所需的域被阻塞。
如果您住在伊朗要下载此新库,则必须先连接到VPN。
不要忘记将Android Studio的代理设置更改为使用VPN,然后重试该操作。