Open BurningDroid opened 3 months ago
lateinit property getPortfolios has not been initialized
What is this property? Is this something in your code (I don't see it in the AlarmReceiver
you posted)? Is it an @Inject
property?
lateinit property getPortfolios has not been initialized
What is this property? Is this something in your code (I don't see it in the
AlarmReceiver
you posted)? Is it an@Inject
property?
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
// Dagger Hilt
implementation 'com.google.dagger:hilt-android:2.52'
kapt 'com.google.dagger:hilt-compiler:2.52'
Issue was due to class path version in project level build.gradle file
classpath 'com.google.dagger:hilt-android-gradle-plugin:44'
update to
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.52'
make sure all are in same version i.e 2.52
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 https://github.com/google/dagger/issues/4379#issuecomment-2274801756.
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 @ApplicationContext
)
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?