https://kotlinlang.org logo
#compose
Title
# compose
l

Lilly

03/22/2024, 4:30 PM
Since the material3 1.3.0-alpha02 update I get following error: > java.lang.IllegalStateException: Asking for intrinsic measurements of SubcomposeLayout layouts is not supported. This includes components that are built on top of SubcomposeLayout, such as lazy lists, BoxWithConstraints, TabRow, etc.
Copy code
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
    LazyColumn(Modifier.padding(innerPadding)) {
        item {
            ListItem(
                headlineContent = {},
                trailingContent = {
                    BoxWithConstraints {}
                },
            )
        }
    }
}
So far I figured out that I can avoid the error by giving
BoxWithConstraints
a fix width but what is the correct way to fix this and what has changed that casuses this? EDIT: I found the commit: https://android.googlesource.com/platform/frameworks/support/+/0dfcbe5c6d7d309498906ed40011cda23994dcd9