When LiveEdit enabled, it always says "Error durin...
# compose
k
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
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
I tried once and did not have a pleasant experience either
c
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
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
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
Hi. Apologies for the delay, this specific IllegalStateException was rather tricky to reproduce. We should have it fixed in the next stable release.