mr
11/08/2015, 5:49 PMclass Preferences(val context: Context) {
private val prefAware: PreferencesAware
init {
prefAware = PreferencesAware { context.defaultSharedPreferences }
}
public var authToken by prefAware.bindPreference(default = "")
}
but when run it, throw exception
java.lang.NoSuchMethodError: No direct method <init>(Lkotlin/jvm/functions/Function0;)V in class Lcom/github/vmironov/jetpack/preferences/PreferencesAware$Companion$invoke$1; or its super classes (declaration of 'com.github.vmironov.jetpack.preferences.PreferencesAware$Companion$invoke$1’