rxjava链中的stackoverflowerror

时间:2016-10-27 11:46:23

标签: android rx-java retrofit2

我有一个rxjava链登录和下载联系人ect使用retrofit2。不过,我在android 2.3.3设备上获得了stackoverflower错误。无论如何都要减少函数调用链?

W: java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
W:     at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59)
W:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444)
W:     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
W:     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
W:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)
W:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
W:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
W:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
W:     at java.lang.Thread.run(Thread.java:1019)
W: Caused by: java.lang.StackOverflowError
W:     at okhttp3.HttpUrl.canonicalize(HttpUrl.java:1795)
W:     at okhttp3.HttpUrl$Builder.push(HttpUrl.java:1429)
W:     at okhttp3.HttpUrl$Builder.resolvePath(HttpUrl.java:1420)
W:     at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1379)
W:     at okhttp3.HttpUrl.newBuilder(HttpUrl.java:874)
W:     at okhttp3.HttpUrl.resolve(HttpUrl.java:849)
W:     at retrofit2.RequestBuilder.build(RequestBuilder.java:190)
W:     at retrofit2.ServiceMethod.toRequest(ServiceMethod.java:112)
W:     at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:178)
W:     at retrofit2.OkHttpCall.request(OkHttpCall.java:61)
W:     at *snip*.retrofit.ErrorCallAdapter$1.adapt(ErrorCallAdapter.java:47)
W:     at *snip*.retrofit.ErrorCallAdapter$1.adapt(ErrorCallAdapter.java:39)
W:     at retrofit2.Retrofit$1.invoke(Retrofit.java:147)
W:     at $Proxy4.roster(Native Method)
W:     at *snip*.managers.ContactManager$1.call(ContactManager.java:148)
W:     at *snip*.managers.ContactManager$1.call(ContactManager.java:145)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
W:     at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
W:     at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
W:     at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:48)
W:     at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onNext(OnSubscribeDoOnEach.java:101)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
W:     at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
W:     at rx.observers.SerializedObserver.onNext(SerializedObserver.java:91)
W:     at rx.observers.SerializedSubscriber.onNext(SerializedSubscriber.java:94)
W:     at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.innerNext(OnSubscribeConcatMap.java:182)
W:     at rx.internal.operators.OnSubscribeConcatMap$ConcatMapInnerScalarProducer.request(OnSubscribeConcatMap.java:366)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.drain(OnSubscribeConcatMap.java:278)
W:     at rx.internal.operators.OnSubscribeConcatMap$ConcatMapSubscriber.onNext(OnSubscribeConcatMap.java:144)
W:     at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
W:     at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
W:     at rx.internal.operators.OperatorToObservableList$1.onCompleted(OperatorToObservableList.java:98)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:656)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onCompleted(OperatorMerge.java:281)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onCompleted(OnSubscribeMap.java:97)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onCompleted(OperatorOnErrorResumeNextViaFunction.java:101)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onCompleted(OperatorMapResponseToBodyOrError.java:48)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:184)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159)
W:     at rx.Subscriber.setProducer(Subscriber.java:205)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:94)
W:     at rx.internal.operators.OnSubscribeConcatMap.call(OnSubscribeConcatMap.java:42)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
W:     at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
W:     at rx.internal.producers.SingleDelayedProducer.emit(SingleDelayedProducer.java:102)
W:     at rx.internal.producers.SingleDelayedProducer.setValue(SingleDelayedProducer.java:85)
W:     at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:48)
W:     at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:511)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:466)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:244)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
W:     at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onNext(OperatorOnErrorResumeNextViaFunction.java:154)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:41)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:38)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159)
W:     at rx.Subscriber.setProducer(Subscriber.java:205)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
W:     at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onNext(OperatorOnErrorResumeNextViaFunction.java:154)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:41)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:38)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159)
W:     at rx.Subscriber.setProducer(Subscriber.java:205)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
W:     at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onNext(OperatorOnErrorResumeNextViaFunction.java:154)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:41)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:38)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159)
W:     at rx.Subscriber.setProducer(Subscriber.java:205)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:395)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:355)
W:     at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:846)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onNext(OperatorOnErrorResumeNextViaFunction.java:154)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:41)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:38)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159)
W:     at rx.Subscriber.setProducer(Subscriber.java:205)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
W:     at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:148)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:77)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onNext(OperatorOnErrorResumeNextViaFunction.java:154)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:41)
W:     at retrofit2.adapter.rxjava.OperatorMapResponseToBodyOrError$1.onNext(OperatorMapResponseToBodyOrError.java:38)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
W:     at rx.internal.producers.ProducerArbiter.setProducer(ProducerArbiter.java:126)
W:     at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.setProducer(OperatorOnErrorResumeNextViaFunction.java:159)
W:     at rx.Subscriber.setProducer(Subscriber.java:205)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
W:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
W:     at rx.Observable.unsafeSubscribe(Observable.java:10200)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
W:     at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
W:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)

等。

大多数都是用.flatMap()链接的。有更好的替代方案吗?

1 个答案:

答案 0 :(得分:-2)

我设法通过使用Observable.zip()并行执行更多操作来修复它。希望我没有创造竞争条件......