使用绿色 Robot Eventbus 时出现错误
E/AndroidRuntime(2537): Caused by: de.greenrobot.event.EventBusException: Subscriber class com.example.MyActivity has no public methods called onEvent
Details:
我正在加载包含一个带有 10 个子片段的片段的 Activity,而不是调用EventBus.getDefault().register(this);
在我称之为的每个嵌套(子)片段中register
在该片段的父活动中。
通过声明解决onEventMainThread
方法和EventBus.getDefault().register(this);
在同一个片段中(应在同一个类中声明)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)