使用EventButs3.0.0 出现以下错误

Caused by: de.greenrobot.event.EventBusException: Subscriber class com.gozap.beacontower.ui.NewsFragment and its super classes have no public methods with the @Subscribe annotationat de.greenrobot.event.SubscriberMethodFinder.findSubscriberMethods(SubscriberMethodFinder.java:82)at de.greenrobot.event.EventBus.register(EventBus.java:135)at com.gozap.beacontower.ui.BaseFragment.onAttach(BaseFragment.java:32)at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1019)at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:601)at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1174)at android.app.Activity.performStart(Activity.java:5203)at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286) at android.app.ActivityThread.access$600(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5166) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:768) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) at dalvik.system.NativeStart.main(Native Method) 

解决方法:

按照cased by中提示,method改为public 并添加@Subscribe

    @Subscribepublic void onEvent(MyEvent event) {*******}

Subscriber class .NewsFragment and its super classes have no public methods相关推荐

  1. Subscriber class XXX and its super classes have no public methods with the @Subscribe annotation

    Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class com.pdxx.yxzp.main.student.ex ...

  2. EventBus: Subscriber class XXX and its super classes have no public method with the @Subscribe

    踩坑错误记录 在做安卓项目的时候,要使用实现在Fragment之间传数据,故使用EventBus,但遇到一个错误: org.greenrobot.eventbus.EventBusException: ...

  3. AndroidStudio EventBus报错解决方法its super classes have no public methods with the @Subscribe

    AndroidStudio EventBus报错解决方法its super classes have no public methods with the @Subscribe 参考文章: (1)An ...

  4. EventBus报错:and its super classes have no public methods with the @Subscribe annotation

    繁忙的工期终于结束了,今天封装了工作相关的内容.在处理一个观测者模式的时候想想用用EventBus,于是就用EventBus写了一个栗子但是发现报错了!!!!!看了看报错的内容and its supe ...

  5. Subscriber class xxx.xxx.xxx and its super classes have no public methods with the@Subscribe annotat

    转载自:http://blog.csdn.net/u012452490/article/details/49737693 使用EventBus 3.0.0-beta1的出现bug 报错的原因提示:提示 ...

  6. Android 解决 No static method in class La/a/a/a; or its super classes

    错误堆栈: Process: com.chaozh.iReader, PID: 24217java.lang.NoSuchMethodError: No static method getDrawab ...

  7. Android java.lang.NoSuchMethodError: No virtual method ;or its super classes (declaration of

    修改 AOSP 源码后调用错误 java.lang.NoSuchMethodError: No virtual method *** in class *** ;or its super classe ...

  8. Android EventBus Subscriber class XXXActivity has no public methods called onEvent

    错误信息: Caused by: c.a.a.g: Subscriber class XXXActivity has no public methods called onEvent. 造成这个错误的 ...

  9. EventBus3.0源码解析

     本文主要介绍EventBus3.0的源码 EventBus是一个Android事件发布/订阅框架,通过解耦发布者和订阅者简化 Android 事件传递. EventBus使用简单,并将事件发布和 ...

最新文章

  1. ubuntu联网经常掉线的解决方法
  2. 10、计算机图形学——几何介绍(曲面的分类以及示例)
  3. 智能情绪分析技术_石化缘推荐:炼化企业智能机器人巡检技术应用前景分析!...
  4. 屏蔽tomcat服务器报错信息,tomcat 屏蔽网络爬虫
  5. mac 安装php swoole扩展
  6. django 引入jquery 3.5.1_2020年最新Django经典面试问题与答案汇总(中)-大江狗整理
  7. 汇编中NEG和NOT的区别(汇编初学者简单笔记)
  8. Oracle数据库文件中的导入\导出(imp/exp命令)
  9. 在Windows中安装SoapUI
  10. MySQL登录命令详解
  11. 【计算机组成】内存和芯片存储容量问题
  12. 《生命中不能承受之轻》读书笔记
  13. 最全app上传渠道入口 拿去即用
  14. 2203-python基础知识
  15. 新电脑 安装idea迁移设置和插件注意事项
  16. 美IT业25大秘密:Facebook耗时一周建成
  17. Python——列表与元组
  18. 构建风控评分卡模型介绍(WOE/KS/ROC)
  19. Python练习——L1-051 打折 (5分)
  20. 关于创建的虚拟机mac 无法调整分辨率

热门文章

  1. html5 div 拱桥形状制作,纯CSS3+DIV实现小三角形边框效果的示例代码
  2. springboot项目jar包发布的,如何线上修改jar包。
  3. visio文本框输入公式
  4. 使用HttpURLConnection 越过ssl证书访问htts协议接口
  5. 安卓Android修改车机版系统的导航栏和状态栏高度
  6. 十面阿里,七面头条,六个Offer,春招结束
  7. 西门子real是什么数据类型_西门子数据类型REAL转WORD和S5TIME的方法
  8. 西门子200SMART(六)数据块
  9. 互联网创新影院:5G有手机的地方就有电影院
  10. 如何使用API_api接口有什么优点