Not able to use dagger-injected objects in attachBaseContext() to update locale
1 I am using dagger and I have to update the locale in the attachBaseContext of the activity , I am keeping the locale update logic inside LocaleManager and LocaleManager instance is already inside appModule when I try to use this LocaleManager instance inside attachBaseContext I get null pointer exception as the activity's injections happen after attachBaseContext inside onCreate() . android android-7.0-nougat dagger share | improve this question edited Nov 14 '18 at 5:10 Ravindra Kushwaha 3,516 5 25 60 asked Nov 13 '18 at 9:23 user2143279 user2143279 6 2 add a comment | 1 I am using dagger and I have to update the locale in the attachBaseContext of the activity , I am keeping the locale update logic inside LocaleManager and LocaleManager instance is already inside appModule when I try to use this LocaleManager instance inside attachBaseContext I get null pointer exception as the activity...