异常信息如下:
io.reactivex.exceptions.UndeliverableException:The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | android.os.NetworkOnMainThreadException
io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
......
Caused by:
android.os.NetworkOnMainThreadException:
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1571)
com.android.org.conscrypt.Platform.blockGuardOnNetwork(Platform.java:424)
com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:530)
okio.InputStreamSource.read(JvmOkio.kt:90)
okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129)
okio.RealBufferedSource.read(RealBufferedSource.kt:188)
okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.kt:352)
okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.read(Http1ExchangeCodec.kt:389)
okhttp3.internal.Util.skipAll(Util.kt:337)
okhttp3.internal.Util.discard(Util.kt:358)
okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.close(Http1ExchangeCodec.kt:408)
okio.ForwardingSource.close(ForwardingSource.kt:34)
okhttp3.internal.connection.Exchange$ResponseBodySource.close(Exchange.kt:306)
okio.RealBufferedSource.close(RealBufferedSource.kt:498)
okio.ForwardingSource.close(ForwardingSource.kt:34)
okio.RealBufferedSource.close(RealBufferedSource.kt:498)
zlc.season.rxdownload4.utils.HttpUtilKt.closeQuietly(HttpUtil.kt:11)
zlc.season.rxdownload4.downloader.NormalDownloader$startDownload$3.accept(NormalDownloader.kt:91)
zlc.season.rxdownload4.downloader.NormalDownloader$startDownload$3.accept(NormalDownloader.kt:17)
io.reactivex.internal.operators.flowable.FlowableGenerate$GeneratorSubscription.dispose(FlowableGenerate.java:143)
io.reactivex.internal.operators.flowable.FlowableGenerate$GeneratorSubscription.request(FlowableGenerate.java:115)
io.reactivex.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.requestMore(FlowableFlatMap.java:686)
io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drainLoop(FlowableFlatMap.java:516)
io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drain(FlowableFlatMap.java:366)
io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.request(FlowableFlatMap.java:345)
io.reactivex.internal.operators.flowable.FlowableDoFinally$DoFinallySubscriber.request(FlowableDoFinally.java:107)
io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:414)
io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
android.os.Handler.handleCallback(Handler.java:883)
android.os.Handler.dispatchMessage(Handler.java:100)
android.os.Looper.loop(Looper.java:224)
android.app.ActivityThread.main(ActivityThread.java:7520)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
异常信息如下: io.reactivex.exceptions.UndeliverableException:The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | android.os.NetworkOnMainThreadException io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367) ...... Caused by: android.os.NetworkOnMainThreadException: android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1571) com.android.org.conscrypt.Platform.blockGuardOnNetwork(Platform.java:424) com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:530) okio.InputStreamSource.read(JvmOkio.kt:90) okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129) okio.RealBufferedSource.read(RealBufferedSource.kt:188) okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.kt:352) okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.read(Http1ExchangeCodec.kt:389) okhttp3.internal.Util.skipAll(Util.kt:337) okhttp3.internal.Util.discard(Util.kt:358) okhttp3.internal.http1.Http1ExchangeCodec$FixedLengthSource.close(Http1ExchangeCodec.kt:408) okio.ForwardingSource.close(ForwardingSource.kt:34) okhttp3.internal.connection.Exchange$ResponseBodySource.close(Exchange.kt:306) okio.RealBufferedSource.close(RealBufferedSource.kt:498) okio.ForwardingSource.close(ForwardingSource.kt:34) okio.RealBufferedSource.close(RealBufferedSource.kt:498) zlc.season.rxdownload4.utils.HttpUtilKt.closeQuietly(HttpUtil.kt:11) zlc.season.rxdownload4.downloader.NormalDownloader$startDownload$3.accept(NormalDownloader.kt:91) zlc.season.rxdownload4.downloader.NormalDownloader$startDownload$3.accept(NormalDownloader.kt:17) io.reactivex.internal.operators.flowable.FlowableGenerate$GeneratorSubscription.dispose(FlowableGenerate.java:143) io.reactivex.internal.operators.flowable.FlowableGenerate$GeneratorSubscription.request(FlowableGenerate.java:115) io.reactivex.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.requestMore(FlowableFlatMap.java:686) io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drainLoop(FlowableFlatMap.java:516) io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.drain(FlowableFlatMap.java:366) io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.request(FlowableFlatMap.java:345) io.reactivex.internal.operators.flowable.FlowableDoFinally$DoFinallySubscriber.request(FlowableDoFinally.java:107) io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:414) io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176) io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124) android.os.Handler.handleCallback(Handler.java:883) android.os.Handler.dispatchMessage(Handler.java:100) android.os.Looper.loop(Looper.java:224) android.app.ActivityThread.main(ActivityThread.java:7520) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)