Closed Moozart closed 1 year ago
Hi. Can you provide more context? What exactly are you doing? As far as I know there is no such thing as (or need for) skiko for Android.
I am trying to do json animation like lottie with skiko and skia which I mentioned on the above demo link (LottieAnimation.kt) for kotlin/compose multiplatform mobile app. Runtime crash occurs on android emulator.
Skiko has android binaries, but it's not supposed to be used inside android compose application - Android uses skia under the hood and does not require second copy of it. Please use official library for lottie animations via expect
/actual
on Android.
@MatkovIvan What was the plan behind 'un-exposing' the Skia API ? It would've been better to keep the APIs public so we wouldn't need to try to implement Skiko as an external dependency while it's already being used under the hood.
If you're talking about Compose, it still is - https://github.com/JetBrains/compose-multiplatform/issues/3152
The plan is to make it at least optional (explicit dependency declaration, separate module or so). So it will be defenitely available but explicitly and not by default
@MatkovIvan Thank you for your response. I found out that your skia/skiko is not exactly the same that is implemented by Jetpack Compose. Correct ? How can I, for example, implement the Skottie example in androidMain provided thatorg.jetbrains.skia
imports do not work, and explicitly adding the Skiko dependency will throw the error mentioned atop of this thread
skiko is not exactly the same that is implemented by Jetpack Compose
On Android skia is part of OS and not everything is exposed
How can I, for example, implement the Skottie example in androidMain
As mentioned above:
Please use official library for lottie animations via expect/actual on Android.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
I faced this issue. kotlin: 1.9.0 compose-multiplatform: 1.5.0 Java: 17
Ios don't have crash. But animation stops.
I added this LottieAnimation class. demo