hehonghui / AndroidEventBus

A lightweight eventbus library for android, simplifies communication between Activities, Fragments, Threads, Services, etc.
Apache License 2.0
1.61k stars 392 forks source link

使用jar收不到消息 #44

Open sunflowerofpq opened 7 years ago

sunflowerofpq commented 7 years ago

你好,我用了这个版本的jar,就直接传字符串都收不到消息。在MainActivity的onCreate 中 EventBus.getDefault().register(this); 注册,onDestroy中 EventBus.getDefault().unregister(this); 在button中的点击事件发了这个 EventBus.getDefault().post(new ReceviceEvent("I am send a message")); 然后在SecondActivity 中 @Subscriber(mode= ThreadMode.MAIN) public void Message(ReceviceEvent s){ Log.e(TAG,"sting ××××××××:"+s.getMessage()); },但是却收不到消息,不知道哪出了问题。能不能帮忙解决一下?