GithubHelp home page GithubHelp logo

将simpleEventbus替换后,启动应用就报its super classes have no public methods with the @Subscribe annotation about fastlib HOT 15 CLOSED

wangsong1991 avatar wangsong1991 commented on May 26, 2024
将simpleEventbus替换后,启动应用就报its super classes have no public methods with the @Subscribe annotation

from fastlib.

Comments (15)

AriesHoo avatar AriesHoo commented on May 26, 2024

你是用的哪个版本?还有在最新的版本里eventbus没有被导入需要自己引入。还有就是你使用FastLib的demo有没有问题

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

我知道 我用的2.3.4 我自己导入了eventbus,替换simple.evenbus后,就显示这个问题,不知道是我的原因还是说替换出错了,

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

demo是没有问题的

from fastlib.

AriesHoo avatar AriesHoo commented on May 26, 2024

你是想用 org.greenrobot:eventbus:3.1.1 这个eventbus嘛

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

我看git上的用法 跟之前没有什么区别呀,所以我就替换了升级了一下版本

from fastlib.

AriesHoo avatar AriesHoo commented on May 26, 2024

你要在对应的Activity里定义public methods with the @subscribe annotation 如图
image
我之前一直用的是AndroidEventBus没实际弄过EventBus。后面版本会将 isEventBusEnable 默认返回false
不使用EventBus的Activity得手动将isEventBusEnable 设置成false不然就会出现你说的那个问题,后续版本会进行调整

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

image
哦 那就麻烦了我这里 用的地方不多,不用的地方那就数不过来了 那我先不用eventbus

from fastlib.

AriesHoo avatar AriesHoo commented on May 26, 2024

可以用AndroidEventBus先

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

image androideventbus不会受影响是吗?

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

AndroidEventBus现在不维护了

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

现在是2.3.2以上版本 添加依赖后就会出现在这个问题

from fastlib.

wangsong1991 avatar wangsong1991 commented on May 26, 2024

添加了androideventbus也不管用,该怎么弄?

from fastlib.

AriesHoo avatar AriesHoo commented on May 26, 2024

AndroidEventBus功能目前是够用了的。我项目里一直在用,添加了AndroidEventBus要去掉EventBus、归根到底
1、添加了EventBus的在所有的Activity添加public methods with the @subscribe annotation或者
2、不需要EventBus的Activity isEventBusEnable返回false不执行注册操作即可
后续我将isEventBusEnable默认返回false

from fastlib.

AriesHoo avatar AriesHoo commented on May 26, 2024

2.3.5版本做了修复。可以用正常使用EventBus不做其它设置即可

from fastlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.