NetworkOnMainThreadException
I bumped into this exception while flinging through a list with photos. I'm using the OkHttp library as well. According to log, this may be their issue, not yours. Just want you to know about this. The log is:
android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147) at com.android.org.conscrypt.OpenSSLSocketImpl.shutdownAndFreeSslNative(OpenSSLSocketImpl.java:1090) at com.android.org.conscrypt.OpenSSLSocketImpl.close(OpenSSLSocketImpl.java:1085) at com.squareup.okhttp.Connection.closeIfOwnedBy(Connection.java:141) at com.squareup.okhttp.OkHttpClient$1.closeIfOwnedBy(OkHttpClient.java:71) at com.squareup.okhttp.internal.http.HttpConnection.closeIfOwnedBy(HttpConnection.java:134) at com.squareup.okhttp.internal.http.HttpTransport.disconnect(HttpTransport.java:135) at com.squareup.okhttp.internal.http.HttpEngine.disconnect(HttpEngine.java:468) at com.squareup.okhttp.Call.cancel(Call.java:118) at com.facebook.imagepipeline.backends.okhttp.OkHttpNetworkFetchProducer$1.onCancellationRequested(OkHttpNetworkFetchProducer.java:86) at com.facebook.imagepipeline.producers.SettableProducerContext.cancel(SettableProducerContext.java:127) at com.facebook.imagepipeline.producers.MultiplexProducer$Multiplexer$1.onCancellationRequested(MultiplexProducer.java:270) at com.facebook.imagepipeline.producers.SettableProducerContext.cancel(SettableProducerContext.java:127) at com.facebook.imagepipeline.producers.MultiplexProducer$Multiplexer$1.onCancellationRequested(MultiplexProducer.java:270) at com.facebook.imagepipeline.producers.SettableProducerContext.cancel(SettableProducerContext.java:127) at com.facebook.imagepipeline.datasource.AbstractProducerToDataSourceAdapter.close(AbstractProducerToDataSourceAdapter.java:99) at com.facebook.drawee.controller.AbstractDraweeController.releaseFetch(AbstractDraweeController.java:173) at com.facebook.drawee.controller.AbstractDraweeController.release(AbstractDraweeController.java:165) at com.facebook.drawee.components.DeferredReleaser$1.run(DeferredReleaser.java:64)
Pull request #21 will deal with this.
Great! Thanks for your quick reply
Duplicate