Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use org.greenrobot.eventbus inside of separate module #674

Open
sayantanbasu opened this issue Sep 28, 2021 · 1 comment
Open
Labels
more info required Needs more info to become actionable.

Comments

@sayantanbasu
Copy link

I am trying to access org.greenrobot.eventbus in separate module in my project. But, getting below error. When I'm declaring @subscribe method in MainActivity activity this is resolved. But, I want to subscribe from the module, not from the main project. Need your help to fix this issue.

org.greenrobot.eventbus.EventBusException: Subscriber class com.sayantan.weekcalender.MainActivity and its super classes have no public methods with the @subscribe annotation

@andob
Copy link
Contributor

andob commented Sep 28, 2021

it's not about the separate module.

the error means the class doesn't have any method annotated with subscribe (it doesn't receive any event).

you can wrap eventbus.register(this) call inside a try catch block if it's intended behavior on your use case.

@greenrobot-team greenrobot-team added the more info required Needs more info to become actionable. label Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info required Needs more info to become actionable.
Projects
None yet
Development

No branches or pull requests

3 participants