I setup the following in my app's build.gradle fil...
# android
m
I setup the following in my app's build.gradle file:
Copy code
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
dependencies {
  kapt "com.google.dagger:dagger-compiler:2.1"
  kapt "com.android.databinding:compiler:$androidGradlePluginVersion"
  kapt "me.tatarka:gradle-retrolambda:3.6.0"
}
kapt {
  generateStubs = true
}
t
mattinger: try removing
apply plugin: 'kotlin-kapt'
m
@trevjones doing that stops the databinding compiler from running altogether, so java files don't compile either.
s
first of all remove
Copy code
kapt {
  generateStubs = true
}
it's not needed for kapt 3 AFAIK kotlin does not work with retrolambda
m
i agree kotlin does not need retrolambda, but my java code needs it. It seems that i was actually chasing a ghost.
seems that the java -> kotlin converter did this for me:
@Inject private SettingsManager settingsManager
-->
@Inject internal var settingsManager: SettingsManager? = null
that's the actual problem.
I changed it to:
lateinit var settingsManager: SettingsManager
and it works.
i also changed the reference to my binding object to be a lateinit as well for good measure.