-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hilt: Injection not working in BroadcastReceiver #4379
Comments
What is this property? Is this something in your code (I don't see it in the |
Oh sorry, I updated the error log |
Hmm, this suggests that maybe the bytecode injection isn't working properly. Does it work if you extend the hilt class manually (see changes below)? -@AndroidEntryPoint
+@AndroidEntryPoint(BroadcastReceiver::class)
-class AlarmReceiver : BroadcastReceiver() { ... }
+class AlarmReceiver : Hilt_BroadcastReceiver() { ... } |
Same here, I also have this issue |
I had the same issue but in my case, I was using
Issue was due to class path version in project level build.gradle file |
Same here, I have the same issue in 2.49. |
I'm on 2.52 and can confirm the crash. |
@vincent-paing can you try the suggestion in #4379 (comment). If that works that will also help us narrow down if the issue is related to the plugin. |
You can update hilt and hilt compiler version to 2.51. I updated to this version and worked for me. |
I have tried both 2.52 and 2.51 to inject in BroadcastReceiver, and can confirm the crash. (Inject with |
I have an app that has been running for 3 years.
I have implemented and am using BroadcastReceiver.
I recently updated the hilt version from 2.45.0 to 2.51.0.
After the update, Firebase Crashlytics started showing an explosion of new crashes.
These are completely new crashes that were never there before.
The crash is:
Nothing has changed in the hilt settings.
Only the version has changed, and the AlarmReceiver was working fine before.
What could be the bug in 2.51.0?
The text was updated successfully, but these errors were encountered: