博客
关于我
ButterKnife使用问题
阅读量:395 次
发布时间:2019-03-05

本文共 494 字,大约阅读时间需要 1 分钟。

1.Caused by: java.lang.IllegalStateException: Required view 'button' with ID 2131165211 for method 'clickBtn' was not found. If this view is optional add '@Nullable' (fields) or '@Optional' (methods) annotation.

绑定view的时候添加@Nullable注解。

绑定方法的时候使用@Optional注解。

2.Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class com.example.mytestapp.eventbus.TestEventBusfirstActivity and its super classes have no public methods with the @Subscribe annotation

每个注册eventbus的地方都需要添加public订阅方法

转载地址:http://qdbzz.baihongyu.com/

你可能感兴趣的文章
Node.js 实现类似于.php,.jsp的服务器页面技术,自动路由
查看>>
Node.js 异步模式浅析
查看>>
node.js 怎么新建一个站点端口
查看>>
Node.js 文件系统的各种用法和常见场景
查看>>
Node.js 模块系统的原理、使用方式和一些常见的应用场景
查看>>
Node.js 的事件循环(Event Loop)详解
查看>>
node.js 简易聊天室
查看>>
Node.js 线程你理解的可能是错的
查看>>
Node.js 调用微信公众号 API 添加自定义菜单报错的解决方法
查看>>
node.js 配置首页打开页面
查看>>