Compose beta01 - java.lang.IllegalStateException: Attempted to realize group twice

Viewed 281

I am migrating to Jetpack Compose 1.0.0-beta01 and I am encountering a compiler crash. java.lang.IllegalStateException: Attempted to realize group twice the logs are pretty obscure and nothing seems to point the our code. Has anyone encountered something similar or has an idea how I could find the source of this issue?

1 Answers

I have this issue when compile a code with @Composable function in forEach lambda of collection of Any elements. Something like this

listOf(1f, 2.0, 4L, 0).forEach {
    Text("value: $it")
}

So check your code for this bottleneck.

Related