skip to Main Content

I’ve been trying to use kodein in my android studio and I’m getting this issue

The root cause org.jetbrains.kotlin.psi2ir.generators.ErrorExpressionException was thrown at: org.jetbrains.kotlin.psi2ir.generators.ErrorExpressionGenerator.generateErrorCall(ErrorExpressionGenerator.kt:99)
null: KtCallExpression:
kodein()
at
org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:239)

here is how I’m calling it in activity

override val kodein by kodein()

I’ve tried updating all my dependencies, however still no result,

Any help would be appreciated.

2

Answers


  1. This is not a Kodein issue. this is a kotlin issue. Please try updating your kotlin version.

    try 1.6.10

    Login or Signup to reply.
  2. we need to import import org.kodein.di.android.kodein for kodein()

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search