RuntimeException的:无法调度事件@奥托 [英] RuntimeException: Could not dispatch event @ otto

查看:983
本文介绍了RuntimeException的:无法调度事件@奥托的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经在我们当前的应用程序版本与奥托的事件处理程序的问题。 我们收到了的RuntimeException 在我们的崩溃日志,有如下描述:

we have an issue in our current app-version with the EventHandler from otto. We get a RuntimeException in our crash-log, with following description:

原因:java.lang.RuntimeException的:无法调度事件:   classcom.nameOfBrand.ui.events.SwitchFragmentEvent到处理程序   [事件处理器公共无效   com.nameOfBrand.ui.activities.MainActivity.onSwitchFragmentEvent(com.nameOfBrand.ui.events.SwitchFragmentEvent)]"

"Reason: java.lang.RuntimeException: Could not dispatch event: classcom.nameOfBrand.ui.events.SwitchFragmentEvent to handler [EventHandler public void com.nameOfBrand.ui.activities.MainActivity.onSwitchFragmentEvent(com.nameOfBrand.ui.events.SwitchFragmentEvent)]"

我们有一个按钮,并在其onClickListener我们触发一个自定义的 SwitchFragmentEvent 。 在一些奇怪的情况下,该框架无法调度事件并引发的RuntimeException

We have a button and in its onClickListener we fire an self-defined SwitchFragmentEvent. In some weird situations, the framework can't dispatch the Event and throws an RuntimeException.

与按钮的片段扩展 AbstractResultListFragment 而这一次延伸 AbstractFragment 。我们注册在AbstractFragement的onResume的EventBus和注销的onPause它。一切正常,除了在这一个键:/

The fragment with the button extends AbstractResultListFragment and this one extends AbstractFragment. We register the EventBus in the onResume of AbstractFragement and unregister it at onPause. Everything works fine, except at this one button :/

有没有人有一个想法或有过做这样的事?

Does anyone have an idea or had ever to do with something like this?

更新: Scompt是正确的。该RuntimeException的是从我们的code NullPointerException异常的奥托原因引发。 THX

UPDATE: Scompt was right. The RuntimeException was thrown from otto cause of a NullPointerException in our code. Thx

蒂普:读你的崩溃,日志,直到结束;)

Tipp: Read your crash-logs until the end ;)

推荐答案

这里的的在这一点上,将提供有关坠机的更多信息包装异常。

There should be a wrapped exception at that point that will provide more information about the crash.

这篇关于RuntimeException的:无法调度事件@奥托的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆