我在服务器的listview中加载图片。所有图像都是.png,尺寸非常小,因此可以像列表视图中的图像一样轻松显示。但每次我得到 java.net.SocketException:recvfrom失败:ECONNRESET(连接由对等方重置) .LogCat显示以下异常: -
09-04 14:16:43.402: W/System.err(27413): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
09-04 14:16:43.403: W/System.err(27413): at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592)
09-04 14:16:43.403: W/System.err(27413): at libcore.io.IoBridge.recvfrom(IoBridge.java:556)
09-04 14:16:43.403: W/System.err(27413): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
09-04 14:16:43.403: W/System.err(27413): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
09-04 14:16:43.403: W/System.err(27413): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
09-04 14:16:43.403: W/System.err(27413): at com.android.okio.Okio$2.read(Okio.java:113)
09-04 14:16:43.403: W/System.err(27413): at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147)
09-04 14:16:43.403: W/System.err(27413): at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
09-04 14:16:43.403: W/System.err(27413): at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:175)
09-04 14:16:43.403: W/System.err(27413): at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:101)
09-04 14:16:43.403: W/System.err(27413): at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:616)
09-04 14:16:43.403: W/System.err(27413): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:379)
09-04 14:16:43.403: W/System.err(27413): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
09-04 14:16:43.403: W/System.err(27413): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190)
09-04 14:16:43.403: W/System.err(27413): at com.suvidhaa.AsyncImage.ImageLoader.getBitmap(ImageLoader.java:76)
09-04 14:16:43.403: W/System.err(27413): at com.suvidhaa.AsyncImage.ImageLoader.access$0(ImageLoader.java:59)
09-04 14:16:43.403: W/System.err(27413): at com.suvidhaa.AsyncImage.ImageLoader$PhotosLoader.run(ImageLoader.java:139)
09-04 14:16:43.404: W/System.err(27413): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
09-04 14:16:43.404: W/System.err(27413): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
09-04 14:16:43.404: W/System.err(27413): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-04 14:16:43.404: W/System.err(27413): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-04 14:16:43.404: W/System.err(27413): at java.lang.Thread.run(Thread.java:818)
09-04 14:16:43.404: W/System.err(27413): Caused by: android.system.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
09-04 14:16:43.404: W/System.err(27413): at libcore.io.Posix.recvfromBytes(Native Method)
09-04 14:16:43.404: W/System.err(27413): at libcore.io.Posix.recvfrom(Posix.java:161)
09-04 14:16:43.404: W/System.err(27413): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
09-04 14:16:43.404: W/System.err(27413): at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
09-04 14:16:43.404: W/System.err(27413): ... 20 more
我还尝试使用Picasso库加载图像,但仍面临同样的问题。我能“理解发生了什么。
请帮助我同样的,任何帮助都会很明显。
由于