异常 EventBusException:its super classes have no public methods with the @Subscribe annotation
来源:互联网 发布:淘宝卖明星周边违法吗 编辑:程序博客网 时间:2024/05/22 08:14
今天看了看 EventBus 的用法。
刚开始用的eclipse,复制了jar包之后,写了一些基本代码 运行,一切正常,也没有什么问题。
然后把代码复制到Android Studio里面,
EventBus.getDefault().register(this);报错了。
我也是奇了怪了,第一行就报错了,也就是标题的上面的那个异常。
这里的解决办法是:
这里只要在 onEventMainThread 这个回调 方法上加上 @Subscribe 注解就可以了。
4 0
- 异常 EventBusException:its super classes have no public methods with the @Subscribe annotation
- 异常 EventBusException:its super classes have no public methods with the @Subscribe annotation
- 使用EventBus框架报异常:its super classes have no public methods with the @Subscribe annotation
- Eventbus注册异常:its super classes have no public methods with the @Subscribe annotation
- EventBus报错:and its super classes have no public methods with the @Subscribe annotation
- EventBus3.0报错..its super classes have no public methods with the @Subscribe annotation
- MainActivity and its super classes have no public methods with the @Subscribe annotation
- EventBusException: Subscriber class *** and its super classes have no public methods with the @Subsc
- EventBusException: Subscriber class *** and its super classes have no public methods with the @Subsc
- EventBusException: Subscriber class *** and its super classes have no public methods with the @Subsc
- 关于eventbus报错its super classes have no public methods with the @Subscribe的问题
- AndroidStudio关于EventBus报错解决方法its super classes have no public methods with the @Subscribe
- Subscriber class xxx.xxx.xxx and its super classes have no public methods with the@Subscribe annotat
- Subscriber class xxx.xxx.xxx and its super classes have no public methods with the@Subscribe annotat
- 【Android】AndroidStudio关于EventBus报错解决方法its super classes have no public methods with the @Subscribe
- EventBus 注册错误no public methods with the @Subscribe annotation
- Subscriber class .NewsFragment and its super classes have no public methods
- EventBus的使用及 解决异常Subscriber ****has no public methods called **
- 关于异步跨域请求数据
- cocos2dx学习之路----第六篇(cocos2dx坐标系系统简单窥视)
- Codeforces 629D Babaei and Birthday Cake(DP)
- 一小时自学吉他
- 计算机网络面试题汇总
- 异常 EventBusException:its super classes have no public methods with the @Subscribe annotation
- [python爬虫] Selenium爬取新浪微博内容及用户信息
- java.io.FileNotFoundException: http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd问题终结原因
- 系统签名导入Eclipse中使用
- Android自定义View(一) View的测量
- 本blog初养成小记暨博客初心宣言
- 51Nod 1117 聪明的木匠(贪心+优先队列)
- python字典概述
- 心理的疼痛和肉体的疼痛可能共享同一个神经