question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to start activity - Subscriber classes and its super classes have no public methods with the @Subscribe notation

See original GitHub issue

I’m developing an Android application using EventBus to asynchronously post objects to other classes. However, while running the application, EventBusException says the following:

Subscriber class meetup.be2015.gcm_meetup.MapClass and its super classes have no public methods with the @Subscribe annotation

03-10 14:05:27.000 6490-6490/meetup.be2015.gcm_meetup E/AndroidRuntime: FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to start activity ComponentInfo{meetup.be2015.gcm_meetup/meetup.be2015.gcm_meetup.MapClass}: org.greenrobot.eventbus.EventBusException: Subscriber class meetup.be2015.gcm_meetup.MapClass and its super classes have no public methods with the @Subscribe annotation
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2118)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2143)
        at android.app.ActivityThread.access$700(ActivityThread.java:140)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:174)
        at android.app.ActivityThread.main(ActivityThread.java:4952)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class meetup.be2015.gcm_meetup.MapClass and its super classes have no public methods with the @Subscribe annotation
        at org.greenrobot.eventbus.SubscriberMethodFinder.findSubscriberMethods(SubscriberMethodFinder.java:67)
        at org.greenrobot.eventbus.EventBus.register(EventBus.java:136)
        at meetup.be2015.gcm_meetup.MapClass.onStart(MapClass.java:90)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1178)
        at android.app.Activity.performStart(Activity.java:5198)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2091)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2143) 
        at android.app.ActivityThread.access$700(ActivityThread.java:140) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at android.os.Looper.loop(Looper.java:174) 
        at android.app.ActivityThread.main(ActivityThread.java:4952) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:511) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) 
        at dalvik.system.NativeStart.main(Native Method) 

I have posted the two activities on StackOverflow. You can find them here.

Can someone help me? I’m stuck for a long time, and I can’t seem to find a workaround at all!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
privatezcommented, Mar 11, 2016

@Subscribe public void onEventMainThread(UploadOrderEvent event) { }

Check you methods is’t private? Just change it be public.

5reactions
wingokucommented, Jun 3, 2016

@elsennov No it doesn’t help because you didnt link your stackoverflow answer here

Read more comments on GitHub >

github_iconTop Results From Across the Web

EventBus - Subscriber class and its super classes have no ...
EventBus - Subscriber class and its super classes have no public methods with the @subscribe annotation ... I'm creating an Android application ...
Read more >
WebView - Android Developers
WebView objects allow you to display web content as part of your activity layout, ... (but not clip) any EdgeEffect to its padding,...
Read more >
Activiti User Guide
*The API chapter will guide you through the services which form Activiti's API. These services offer the Activiti engine functionality in a convenient...
Read more >
Classes and objects - C# Fundamentals tutorial | Microsoft Learn
Create your first C# program and explore object oriented concepts.
Read more >
How to get started with EventBus in 3 steps - Greenrobot
public class ; // This method will be called when a MessageEvent is posted (in the UI thread for Toast). @Subscribe · threadMode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found