Skip to content

关于不同版本间Autowired inject机制的问题 #898

Description

@protectedMan

版本 A :
api 'com.alibaba:arouter-api:1.5.0'
annotationProcessor 'com.alibaba:arouter-compiler:1.2.2'

版本 B :
api 'com.alibaba:arouter-api:1.5.1'
annotationProcessor 'com.alibaba:arouter-compiler:1.5.1'

使用 Arouter获取FragmentA,此时不传递param1参数.

版本 A : 不会报错
版本 B : ARouter.getInstance().inject会报空指针的错误

也就是说在版本B中, 如果类中定义了参数, 但是你没有传这个参数, 就会有如下报错:
image
从版本A升级到版本B升级建议, ARouter.getInstance().inject 进行trycash捕获崩溃

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions