Hi guys i have migrated from dagger to dagger HILT
but getting this issue where ever i am passing context
Copy code
Hilt ClassCastException: ViewComponentManager$FragmentContextWrapper cannot be cast to AppCompatActivity
can anyone help ?
z
Zsolt.bertalan
09/16/2022, 10:49 AM
You need to use baseContext. Like this:
https://stackoverflow.com/a/63460392/1067763
If this is in a library, you have to file a ticket with the library, as it happened to me recently.
v
Vivekpanchal64
09/19/2022, 6:25 AM
is there any permanent solution to this ? as we didn't face any issue before migration to HILT ?