搜索
查看
编辑修改
首页
UNITY
NODEJS
PYTHON
AI
GIT
PHP
GO
CEF3
JAVA
HTML
CSS
搜索
菜鸟追梦旅行
这个屌丝很懒,什么也没留下!
关注作者
热门标签
jquery
HTML
CSS
PHP
ASP
PYTHON
GO
AI
C
C++
C#
PHOTOSHOP
UNITY
iOS
android
vue
xml
爬虫
SEO
LINUX
WINDOWS
JAVA
MFC
CEF3
CAD
NODEJS
GIT
Pyppeteer
article
热门文章
1
使用蒲公英工具箱获取设备 UDID_蒲公英获取udid
2
关于vue使用阿里云OSS分片上传(含进度条)_vue2java分片上传视频oss
3
select 1 from table 什么意思_SQL 语句中 WHERE 条件后 写上1=1 是什么意思
4
Java多线程编程,来看这篇就够了!全新Java多线程教程!_java 多线程学习教程
5
STM32学习之路入门篇之指令集及cortex——m3的存储系统
6
在Mac上部署Stable Diffusion
7
软件架构设计与模式之:AI与机器学习架构设计_用ai设计软件架构
8
Java实现简易计算器-界面设计源代码以及作用注释_java简易计算器代码及详细解释
9
android studio安装教程,史上最详细(超多图)!!_androidstudio anz
10
android-gradle-plugin3.0.1源码分析_##{"pluginname":"crashsdk","pluginversionname":"3.
当前位置:
article
> 正文
Android开发eventbus.EventBusException
作者:菜鸟追梦旅行 | 2024-03-16 18:24:25
赞
踩
eventbusexception
前几天碰到了奇葩的EventBus的bug
先看下报错log:
Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class com.yiban1314.OneGot.modules.main.activity.MainActivity and its super classes have no public methods with the @Subscribe annotation
该Activtiy上只做注册,反注册,发送。并没有做接收操作,为什么会报 @Subscribe这个注解的错呢。
后来报错的地方所在的方法加上
@Subscribe注解就好了。
总结:1.报错处可以加上
@Subscribe
2.接收处必须加上
@Subscribe
(threadMode = ThreadMode.
MAIN
)
还有还有:以上的import都不能手动添加,必须等它提示,再按快捷键添加进去,还有方法改为public
声明:
本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:
https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/251301
推荐阅读
article
【
and
roid
所有系统
广播
总结以及用法】
and
【
EventBus
3.0 的用法】_
and
ro...
简要描述:
EventBus
是一款针对Android优化的发布/订阅事件总线。主要功能是替代Intent,H
and
ler,...
赞
踩
article
EventBus
报“Subscriber
class
already
registered
to ...
这句子的话意思也很容易理解,“接收者类已经被注册为事件类了”。之前我是这么写: 事件注册是写在onStart()里面的@...
赞
踩
article
EventBus
: No
subscribers
registered
for event cla...
EventBus
不适合向一个不存在于activity栈中的activity发送消息,这样是失败的,例如:情况1:一个ac...
赞
踩
article
org
.
greenrobot
.
event
bus.EventBusException: Subscri...
org
.
greenrobot
.
event
bus.EventBusException: Subscriber
class
...
赞
踩
article
【
EventBus
】
EventBus
源码解析 (
取消
订阅
)_页面
从
哪里可以看出
bus
取消
订...
一、
取消
订阅
、二、
取消
订阅
unsubscribeByEventType 方法、_页面
从
哪里可以看出
bus
取消
订阅
页...
赞
踩
article
org.
greenrobot
.
event
bus.EventBusException:
already
...
FATAL EXCEPTION: main Process: com.moreunio...
赞
踩
article
de.
greenrobot
.
event
.
EventBusException
: Subscriber ...
java.lang.RuntimeException: Unable to create application com...
赞
踩
article
EventBus
利弊与源码解析_
java
eventbus
的
优缺点
...
EventBus
利弊 和 源码解析_
java
eventbus
的
优缺点
java
eventbus
的
优缺点
...
赞
踩
article
eventbus
报错:
org
.
greenrobot
.
eventbus
.EventBusExcepti...
报错信息2019-05-31 09:15:34.049 2580-2580/com.cxyzy.note E/Andro...
赞
踩
article
Caused
by: org.
greenrobot
.
eventbus
.EventBusExcepti...
好记性不如烂笔头!!!错误提示:
Caused
by: org.
greenrobot
.
eventbus
.EventBusE...
赞
踩
article
EventBus
报“
Subscriber
class
already
registered
to ...
原文这句子的话意思也很容易理解,“接收者类已经被注册为事件类了”。之前我是这么写:事件注册是写在onStart()里面的...
赞
踩
article
Eventbus错误:
org
.
greenrobot
.
eventbus
.EventBusExcepti...
org
.
greenrobot
.
eventbus
.
EventBusException
:
Subscriber
class
...
赞
踩
article
AndroidStudio报错:
Caused
by
:
org
.
greenrobot
.
eventbus
...
Caused
by
:
org
.
greenrobot
.
eventbus
.EventBusException
:
Subscr...
赞
踩
article
Android 开发之
EventBus
《二》_android
eventbus
subscriber
...
前言在
EventBus
源码解析里面我们已经分析过
EventBus
是如何通过反射获取到注解的方法,并且在post消息的...
赞
踩
article
EventBusException:
Subsc
riber
class
***
and
its su...
简述: 去年的时候使用过一次EventBus,今天又遇到使用EventBus的项目,由于时隔一年多了所以写了一个Demo...
赞
踩
article
EventBus
:
Subscribe
r
class
XXX
and
its
super
class
...
错误记录在做安卓项目的时候,要使用实现在Fragment之间传数据,故使用
EventBus
,但遇到一个错误:org.gr...
赞
踩
article
EventBus3.1.1 解决
Caused
by:
org
.
greenrobot
.eventbu...
小菜今天自己写测试 Demo 时,需要用到 EventBus,目前集成 3.1.1 版本,集成的方式很简单,在某个 Fr...
赞
踩
article
EventBus: Subscriber
class
XXX
and
its
super
class
...
EventBus报错:Subscriber
class
XXX
and
its
super
class
es
have
n...
赞
踩
article
EventBusException
:
Subscribe
r
class
and its super c...
错误日志:java.lang.RuntimeException:Unable to resume activity {c...
赞
踩
article
org
.
greenrobot
.
eventbus
.EventBusException: Subscri...
问题:开发中需要用到
eventbus
总线,容易出现一个小问题
and
roid.app.ActivityThread.per...
赞
踩
相关标签
android
通信
eventBus
事件重复注册
框架
EventBus
异常
Exception
registered
java
Android
eventbus.EventBusException
already registered to event cl
ui
移动开发
网络
观察者消费者
android studio
kotlin
Subscriber