MainActivity and its super classes have no public methods with the @Subscribe annotation
来源:互联网 发布:乐拼积木 淘宝 编辑:程序博客网 时间:2024/06/05 09:04
这个问题的答案恐怕一般都是在某个响应方法上加@Subscribe注解,我看了一百遍还是加了,还是没解决问题,后来终于机缘巧合下被我发现了事情的真相
这是我的BaseFragment部分代码:
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view = View.inflate(getContext(), getContentViewLayoutId(), null); unbinder = ButterKnife.bind(this, view); initViewsAndEvents(); return view; }protected abstract int getContentViewLayoutId(); protected abstract void initViewsAndEvents();
我错在不小心把register方法写在getContentViewLayoutId()方法中了,应该写在initViewAndEvents()方法中,以后我可千万注意不在getContentViewLayoutId方法中乱写了。
阅读全文
0 0
- MainActivity and its super classes have no public methods with the @Subscribe annotation
- EventBus报错: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 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
- 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报错its super classes have no public methods with the @Subscribe的问题
- AndroidStudio关于EventBus报错解决方法its super classes have no public methods with the @Subscribe
- 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
- 【Android】AndroidStudio关于EventBus报错解决方法its super classes have no public methods with the @Subscribe
- Subscriber class .NewsFragment and its super classes have no public methods
- EventBus 注册错误no public methods with the @Subscribe annotation
- Partial Classes and Methods
- python求解矩阵搜索问题,矩阵中每一行和第一列都是递增的 给定一个元素查找矩阵中是否存在该元素
- 笔记
- QT无缝切换多语言
- linux ls 命令 (查看文件列表命令)
- JavaWeb: Spring框架学习2(注解)
- MainActivity and its super classes have no public methods with the @Subscribe annotation
- Web 3D智能数字机房,HTML5+WebGL匠心打造
- WEB项目web.xml文件中classpath: 跟classpath*:使用的区别
- 【theano-windows】学习笔记五——theano中张量部分函数
- redis_cluster命令官方文档翻译及实践
- java前端技术---javaScript使用详解(应用篇)
- 2018美团点评内推笔试编程题2
- leetcode 26 Remove Duplicates
- 数据库基础---三种抽象两种数据独立性