EventBus - Subscriber class and its super classes have no public methods with the @subscribe annotation
Please ensure these lines are in your proguard config file if you are using proguard for your builds.
-keepattributes *Annotation*
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
i think it is because onEvent inside MapClass.java has no parameter. Could you try with the expected parameter?
I faced the same issue and after a long research got the solution for every case. This problem is due to absence of @Subscribe public method onEvent() inside the class which you are trying to register Event bus as
EventBus.getDefault().register(this)
. Presence of this function is mandatory if you register a class with Event bus
This can be in two situations
using progruad : progruad may modify name of method onEvent() due to which event bus is not able to find it. Put these lines inide your progruad rules
-keepattributes Annotation
-keepclassmembers class ** {
@org.greenrobot.eventbus.Subscribe ;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *;
}
- if you are not using progruard then definitely your class is missing the method onEvent() with @Subscribe annotation. This annotation with method is mandatory with EventBus version 3.0.0 so double check presence of this method inside your class.