大家好,我在我的谷歌播放控制台上有来自 RX 的这个例外,我从未在我的项目中看到过它,但它发生了大约 200 次,正如谷歌播放所说......有人对此有想法吗?
java.lang.IllegalStateException:
at rx.android.schedulers.LooperScheduler$ScheduledAction.run (LooperScheduler.java:114)
at android.os.Handler.handleCallback (Handler.java:739)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:158)
at android.app.ActivityThread.main (ActivityThread.java:7230)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)
**Caused by: rx.exceptions.OnErrorFailedException:**
at rx.observers.SafeSubscriber._onError (SafeSubscriber.java:187)
at rx.observers.SafeSubscriber.onError (SafeSubscriber.java:115)
at rx.exceptions.Exceptions.throwOrReport (Exceptions.java:216)
at rx.observers.SafeSubscriber.onNext (SafeSubscriber.java:139)
at rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onNext (OnSubscribeDoOnEach.java:101)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call (OperatorObserveOn.java:224)
at rx.android.schedulers.LooperScheduler$ScheduledAction.run (LooperScheduler.java:107)
您的代码正在引发未捕获的异常。
您是否为 onError 指定了函数?
[Your Observable].subscribe(value -> {
// Your onNext code
}, throwable -> {
// Handle error
});