Subscriber class .NewsFragment and its super classes have no public methods
来源:互联网 发布:加工中心常用编程代码 编辑:程序博客网 时间:2024/06/05 02:15
使用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
@Subscribe public void onEvent(MyEvent event) { ******* }
0 0
- Subscriber class .NewsFragment and its super classes have no public methods
- 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
- 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
- EventBus报错:and 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: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的问题
- 使用EventBus框架报异常:its super classes have no public methods with the @Subscribe annotation
- EventBus3.0报错..its super classes have no public methods with the @Subscribe annotation
- Eventbus注册异常:its super classes have no public methods with the @Subscribe annotation
- AndroidStudio关于EventBus报错解决方法its super classes have no public methods with the @Subscribe
- 【Android】AndroidStudio关于EventBus报错解决方法its super classes have no public methods with the @Subscribe
- Container Class and its equals(), hashCode() methods
- EventBus的使用及 解决异常Subscriber ****has no public methods called **
- 074 万能的箱子(void*)
- angularjs中post请求进行跨域
- 贝叶斯推断及其互联网应用(二):过滤垃圾邮件
- Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) -- C. Ray Tracing(STL乱搞)
- ConcurrentModificationException异常以及iterator迭代器的使用原理
- Subscriber class .NewsFragment and its super classes have no public methods
- ArcGIS Server9.3的瓦片数据迁移到ArcGIS Server10.3上
- regionprops统计被标记的区域的面积分布,显示区域总数。
- ubuntu安装nvidia官方驱动(安装CUDA7.5之后,找不到TITAN显卡的解决方法)
- JAVASE之Object
- 105.Copy List with Random Pointer-复制带随机指针的链表(中等题)
- Linux环境下的GCC工具链详解(二)
- LeetCode[173] Binary Search Tree Iterator
- [os]pkg 解包和打包