Kotlin Error: Dagger does not support injection into private fields

You have mistake here:

    @Inject
internal var mSharedPreferences: SharedPreferences? = null

This looks like you added @Inject annotation to the KotlinFragment class

Please change it to this and it will work:

var mSharedPreferences: SharedPreferences? = null
        @Inject set

Here is the link to the documentation: https://kotlinlang.org/docs/reference/annotations.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)