https://kotlinlang.org logo
l

loloof64

02/07/2021, 8:07 PM
Hi ! In this documentation : https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Animatable#init. The snippet use
launch
in order to start a new Coroutine. But, though I've installed the coroutine dependency in
gradle.build
, I still get an error in Android Studio What did I forget to set ?
a

Ali Albaali

02/07/2021, 8:50 PM
Maybe you forgot to add the repository? I also think you can do it with
LaunchedEffect
.
👍 1
l

loloof64

02/08/2021, 9:33 AM
Thank you, I think I must use
LaunchedEffect
instead as you're suggesting me, because, as you can see in the app build.gradle, I've already added the repository as an
implementation
dependency.
Indeed : LaunchedEffect seems fine as now, no error. Thank you 🙂
👍 1