Open iqiqx opened 4 years ago
直接在Application onCreate加下面代码
// 配置全局捕获
RxJavaPlugins.setErrorHandler(throwable -> {
if (throwable instanceof UndeliverableException) {
//do nothing
} else {
if (throwable.getMessage() != null) {
Log.w("APP", throwable.getMessage());
}
}
});
已经解决了。谢谢
已经解决了。谢谢
怎么解决的 用群主提供的方法?
Process: com.example.downloaddemo, PID: 15185 io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.net.ConnectException: Failed to connect to /192.168.188.104:8080 at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704) at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701) at io.reactivex.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:79) at io.reactivex.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onError(FlowableDoOnLifecycle.java:85) at io.reactivex.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111) at io.reactivex.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111) at io.reactivex.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onError(FlowableDoOnEach.java:111) at io.reactivex.internal.operators.flowable.FlowableDoOnLifecycle$SubscriptionLambdaSubscriber.onError(FlowableDoOnLifecycle.java:85) at io.reactivex.subscribers.SerializedSubscriber.onError(SerializedSubscriber.java:142) at io.reactivex.internal.operators.flowable.FlowableSampleTimed$SampleTimedSubscriber.onError(FlowableSampleTimed.java:93) at io.reactivex.internal.operators.flowable.FlowablePublish$PublishSubscriber.checkTerminated(FlowablePublish.java:403)