Skip to content

While enable R8 for release build, hilt inject wrong type for member variable - HILT-2.40.1 #3062

@larryxiao625

Description

@larryxiao625

In debug build, there is no problem for my app. But when isMinifyEnabled = true, I have got an ClassCastException, View after unlocking the apk, I saw @Inject got a wrong type
This is the dex file type
image
I have got a CurrentDevicAdapter
But in the source file, it should be DeviceInfoAdapter
image
I have no idea why this problem will occur
I have checkd the mid product for hilt in outputs folder, it is the right type
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions