赞
踩
小菜今天自己写测试 Demo 时,需要用到 EventBus,目前集成 3.1.1 版本,集成的方式很简单,在某个 Fragment 实践应用中,却一直报入下错:
Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class com.roating.ace.frag.FragmentSign and its super classes have no public methods with the @Subscribe annotation
出问题就解决嘛,尝试如下:
- -keepattributes *Annotation*
- -keepclassmembers class ** {
- @org.greenrobot.eventbus.Subscribe <methods>;
- }
- -keep enum org.greenrobot.eventbus.ThreadMode { *; }
-
- # Only required if you use AsyncExecutor
- -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
- <init>(java.lang.Throwable);
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。