I have a this dependency that I want to inject in some activity. I'm using dagger.android
and did all the setup and the project compiles perfectly
In the AppModule:
@Provides
fun provideAppDrawable(application: Application): Drawable? {
return ContextCompat.getDrawable(application, R.drawable.logo)
}
In the activity:
@Inject lateinit var logo: Drawable
Now when I try to run the app, Dagger 2 throws this error error: [Dagger/Nullable] android.graphics.drawable.Drawable is not nullable
Is there a way to fix this problem? Thanks