Phenomenon: usually we register EventBus in the base class and annotate the subscribe method in the subclass, but if there is no public method in the subclass,the Eventbus will report : Fragment and its super classes have no public methods with the @subscribe annotation
Suggestion: delete this code:
if (subscriberMethods.isEmpty()) {
throw new EventBusException("Subscriber " + subscriberClass
+ " and its super classes have no public methods with the @subscribe annotation");
}
so:When subscriberMethods is empty, it returns subscriberMethods directly and no more errors are reported