Giter Club home page Giter Club logo

Comments (5)

ydcool avatar ydcool commented on July 25, 2024 1

找到原因了,不是BUG,低级错误。。基本类型做参数时虽然生命的变量为该类型,但其数值不明确,在自动装箱的时候不一定会转换为想要的包装类,导致匹配不到Subscriber

e.g

long value = 1000;   //wrong
long value = 1000L; //right

from androideventbus.

wurensen avatar wurensen commented on July 25, 2024

什么版本?最新版本post事件类型为基本数据类型或对象类型,订阅函数为基本数据类型或对象类型都能正常接收。

from androideventbus.

ydcool avatar ydcool commented on July 25, 2024

@wurensen 版本1.0.4,应该是最新的吧?
又新建了一个project测试,确实有问题:

  • byte,short,long,char时不能接收
  • int,float,double,boolean 可以接收
  • 不论在Service中还是Activity中,都存在这个问题
  • 转为对象类型后都可以正常接收

from androideventbus.

hehonghui avatar hehonghui commented on July 25, 2024

公司项目吗?

From Meizu MX4

-------- Original message --------
Sender: Ydcool [email protected]
Time: Thu 6/4 23:19
To: bboyfeiyu/AndroidEventBus [email protected]
Subject: Re: [AndroidEventBus] post的event为基本数据类型时Subscriber接收不到 (#15)

Closed #15.


Reply to this email directly or view it on GitHub:
#15 (comment)

from androideventbus.

ydcool avatar ydcool commented on July 25, 2024

@bboyfeiyu 是的

from androideventbus.

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.