eygraber
03/02/2017, 12:21 AMFragmentInjector
and SupportFragmentInjector
both bind KodeinInjected
with overrides = true
because they assume that the Activity
had already done so (https://github.com/SalomonBrys/Kodein/commit/ec1f30080c41f96e68034fb54358a79ca19a0cfb#diff-5a9bd9512babcdb01ff2057a7e5ae72aR234).
The fix should be to swap this:
bindErased<KodeinInjected>(overrides = true) with erasedInstance(this@SupportFragmentInjector)
With:
bindErased<KodeinInjected>(overrides = (activity is KodeinInjected)) with erasedInstance(this@SupportFragmentInjector)