measured with an infinity maximum height 🤖 Android

Jetpack Compose: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed

A LazyColumn (or verticalScroll) is placed inside another vertically scrolling container, so it gets infinite height.

Seen on: Android

Meaning

Nested scrolling in the same direction gives the inner list unbounded height. Use one LazyColumn with multiple item blocks, or give the inner list a fixed/weighted height.

Common causes

  • LazyColumn inside Column(Modifier.verticalScroll)
  • LazyColumn inside another LazyColumn item
  • Scrollable inside a parent with wrapContent height in the same direction

⚡ Quick fix

  1. Merge into a single LazyColumn with item {} / items {}
  2. Give the inner list Modifier.height(...) or weight(1f)
  3. Remove the outer verticalScroll

Detailed fix by platform

Kotlin

  1. kotlin
    LazyColumn {
        item { Header() }
        items(users) { UserRow(it) }
        item { Footer() }
    }

How to diagnose

  1. Hierarchy — Parent scroll containers
  2. Modifiers — Height constraints

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.