https://kotlinlang.org logo
#android
Title
# android
m

mohsenoid

06/23/2017, 9:07 AM
I am using Dagger for injection and using this code for injecting classes into my Activity:
Copy code
@field:[Inject ApplicationContext]
lateinit var context: Context
but
lateinit
does not work with primitive data types like
Boolean
, how can I do something like this?
Copy code
@field:[Inject Named(QualifiersNames.IS_DEMO)]
lateinit var isDemo: Boolean = false
when I remove
lateinit
from it I get this error
Dagger does not support injection into private fields
11 Views