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