Reputation: 35
I'm trying to import Aliyun's httpdns package in my project. But when trying to sync project with it as a dependency, every time the sync failed because the download always timeout, however, I tried to download it directly in a browser, via terminal. I even tried with the Android Studio proxy -> check connection. It showed the connection was ok.
The url of the dependency is 'http://maven.aliyun.com/nexus/content/repositories/releases/com/aliyun/ams/alicloud-android-httpdns/1.1.3/alicloud-android-httpdns-1.1.3.pom'
This is my project build.gradle file, set up according to the document.
allprojects {
repositories {
jcenter()
google()
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
}
}
And this is what I get every time I try to sync project.
org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'http://maven.aliyun.com/nexus/content/repositories/releases/com/aliyun/ams/alicloud-android-httpdns/1.1.3/alicloud-android-httpdns-1.1.3.pom'.
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
Upvotes: 0
Views: 3092
Reputation: 35
Solved by replacing the sock5 proxy to http proxy.
Really should dig a bit deeper into shadowsocks living in China....
Upvotes: 2