java.net.SocketTimeoutException: Transport endpoint is not connected java
個人解決方法是:將xxx.openConnection()改成以下代碼: android
01 |
HttpURLConnection conn = null; |
02 |
String host = android.net.Proxy.getDefaultHost(); |
04 |
int port = android.net.Proxy.getDefaultPort(); |
05 |
SocketAddress vAddress = new InetSocketAddress(host, port); |
06 |
java.net.Proxy vProxy = new java.net.Proxy(java.net.Proxy.Type.HTTP, vAddress); |
07 |
conn = (HttpURLConnection) downUrl.openConnection(vProxy); |
09 |
conn = (HttpURLConnection) downUrl.openConnection(); |
隨後解決了這個問題 spa