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

Kyant

01/27/2023, 2:46 AM
When LiveEdit enabled, it always says "Error during composition" for each code change in (a large amount of) specific Composables, and screen goes white. What caused the error? Is it because my Composables are too complex or LiveEdit is still experimental? Now I can only solve one by replacing
stringResource
to String.
c

Chris Sinco [G]

01/27/2023, 3:22 AM
There should be some output in Logcat that gives you more detail
But yes, it’s still experimental so there are likely still code changes that we haven’t accounted for that breaks it
p

Pablichjenkov

01/27/2023, 3:27 AM
I tried once and did not have a pleasant experience either
c

Chris Sinco [G]

01/27/2023, 3:28 AM
We would really appreciate the feedback so if you find it’s not consistently working with a specific code change, please file a bug with the repro and the output from Logcat, which should have a stack trace and more details on why Live Edit crashed. 🙏
p

Pablichjenkov

01/27/2023, 3:45 AM
My experience was that it launched updates randomly. I left the App plugged and open and randomly the App flashed, because of an update from AS was being pushed into the device. Perhaps that is the way it should work and I was not used to it 🙂
k

Kyant

01/27/2023, 4:22 AM
The Logcat gave me
Error was captured in composition while live edit was enabled.
java.lang.IllegalStateException: Cannot find 'animateDpAsState-IpJuvmw(FLandroidx/compose/animation/core/AnimationSpec;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/State;' in androidx/compose/animation/core/AnimateAsStateKt
a

Alan Leung

08/16/2023, 11:20 PM
Hi. Apologies for the delay, this specific IllegalStateException was rather tricky to reproduce. We should have it fixed in the next stable release.
93 Views