Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when opening Widgets screen #10

Closed
wajahatkarim3 opened this issue Oct 6, 2020 · 4 comments
Closed

App crashes when opening Widgets screen #10

wajahatkarim3 opened this issue Oct 6, 2020 · 4 comments

Comments

@wajahatkarim3
Copy link

I just compiled the project and observed that the app crashes when I open Widgets screen. Its this exception thrown.

--------- beginning of crash
2020-10-06 00:57:00.480 7398-7398/com.guru.composecookbook E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.guru.composecookbook, PID: 7398
    java.lang.IllegalStateException: Surface can have only one direct measurable child!
        at androidx.compose.material.SurfaceKt$SurfaceLayout$1$1.invoke(Surface.kt:131)
        at androidx.compose.material.SurfaceKt$SurfaceLayout$1$1.invoke(Unknown Source:13)
        at androidx.compose.ui.LayoutKt$MeasuringIntrinsicsMeasureBlocks$1.measure-2MWCACw(Layout.kt:385)
        at androidx.compose.ui.node.InnerPlaceable.performMeasure-BRTryo0(InnerPlaceable.kt:48)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.performMeasure-BRTryo0(DelegatingLayoutNodeWrapper.kt:104)
        at androidx.compose.ui.node.LayerWrapper.performMeasure-BRTryo0(LayerWrapper.kt:67)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.performMeasure-BRTryo0(DelegatingLayoutNodeWrapper.kt:104)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.ui.node.DelegatingLayoutNodeWrapper.performMeasure-BRTryo0(DelegatingLayoutNodeWrapper.kt:104)
        at androidx.compose.ui.node.LayerWrapper.performMeasure-BRTryo0(LayerWrapper.kt:67)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.foundation.layout.FillModifier.measure-3Jkh9V0(LayoutSize.kt:464)
        at androidx.compose.ui.node.ModifiedLayoutNode.performMeasure-BRTryo0(ModifiedLayoutNode.kt:36)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.foundation.layout.PaddingModifier.measure-3Jkh9V0(LayoutPadding.kt:169)
        at androidx.compose.ui.node.ModifiedLayoutNode.performMeasure-BRTryo0(ModifiedLayoutNode.kt:36)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:90)
        at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(Unknown Source:0)
        at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:133)
        at androidx.compose.ui.platform.AndroidComposeView.observeMeasureModelReads(AndroidComposeView.kt:430)
        at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:89)
        at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:62)
        at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1173)
        at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasureBlocks$1.invoke(RowColumnImpl.kt:88)
        at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasureBlocks$1.invoke(Unknown Source:13)
        at androidx.compose.ui.LayoutKt$measureBlocksOf$1.measure-2MWCACw(Layout.kt:147)
        at androidx.compose.ui.node.InnerPlaceable.performMeasure-BRTryo0(InnerPlaceable.kt:48)
        at androidx.compose.ui.node.LayoutNodeWrapper.measure-BRTryo0(LayoutNodeWrapper.kt:123)
        at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(OuterMeasurablePlaceable.kt:90)
        at androidx.compose.ui.node.OuterMeasurablePlaceable$remeasure$2.invoke(Unknown Source:0)
        at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:133)
        at androidx.compose.ui.platform.AndroidComposeView.observeMeasureModelReads(AndroidComposeView.kt:430)
        at androidx.compose.ui.node.OuterMeasurablePlaceable.remeasure-BRTryo0(OuterMeasurablePlaceable.kt:89)
        at androidx.compose.ui.node.OuterMeasurablePlaceable.measure-BRTryo0(OuterMeasurablePlaceable.kt:62)
        at androidx.compose.ui.node.LayoutNode.measure-BRTryo0(LayoutNode.kt:1173)
        at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasureBlocks$1.invoke(RowColumnImpl.kt:88)
        at androidx.compose.foundation.layout.RowColumnImplKt$rowColumnMeasureBlocks$1.invoke(Unknown Source:13)
@Gurupreet
Copy link
Owner

Hey buddy Thanks for raising must be because of 04alpha update let me fix it 👍👍

@Gurupreet
Copy link
Owner

@wajahatkarim3 pushed the fix. Thanks for raising 👍

@wajahatkarim3
Copy link
Author

Cool. I was about to send you PR. But now its already fixed. Thanks :)

@Gurupreet
Copy link
Owner

hahah I was on laptop 🤣. Feel free to improve anything you feel like can be 👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants