0

I am implementing an Android app with the usage of Compose Library and i am running in this peculiar error in the compiler:

org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: C:/Users/user5/AndroidStudioProjects/SmartDriveCompose/app/src/main/java/com/example/smartdrivecompose/Screens/Trips.kt
The root cause java.lang.RuntimeException was thrown at: org.jetbrains.kotlin.backend.jvm.codegen.FunctionCodegen.generate(FunctionCodegen.kt:50)

I think it is somehow related with the Modifier.clickable composable method:

modifier = Modifier
    .clickable {
        @Composable
        fun() {
            //set the selected trips for the time period
            createTripCards(mainActivity, selectTripsByTimePeriod("All"))
            dateIcon1TextColor.value = Color.White
            dateIcon1BoxColor.value = Color.Black
            dateIcon2TextColor.value = Color.Black
            dateIcon2BoxColor.value = Color.White
            dateIcon3TextColor.value = Color.Black
            dateIcon3BoxColor.value = Color.White
            dateIcon4TextColor.value = Color.Black
            dateIcon4BoxColor.value = Color.White
        }
    }

Has someone runed into the same issue in the past? Maybe it has something to do with these options in the {app} bild.gradle file?

buildFeatures {
    compose true
    viewBinding true
}
composeOptions {
    kotlinCompilerExtensionVersion '1.0.3'
    kotlinCompilerVersion '1.5.30'
}

Any help is appreciated!

Lampros

  • please search before posting. there are lots of questions about this, lie this one: https://stackoverflow.com/questions/69234206/why-am-i-getting-backend-internal-error-exception-during-ir-lowering-error-wh – user496854 Aug 19 '22 at 07:33
  • Those version numbers are quite dated... and there is no `Trips.kt`. – Martin Zeitler Aug 19 '22 at 07:48

0 Answers0