JetBrains / skiko

Kotlin Multiplatform bindings to Skia
Apache License 2.0
1.83k stars 118 forks source link

java.lang.UnsatisfiedLinkError: dlopen failed: library "libskiko-android-arm64.so" not found #800

Closed Moozart closed 1 year ago

Moozart commented 1 year ago

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

m-sasha commented 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.

Moozart commented 1 year ago

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.

MatkovIvan commented 1 year ago

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.

yuroyami commented 1 year ago

@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.

MatkovIvan commented 1 year ago

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

yuroyami commented 1 year ago

@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

MatkovIvan commented 1 year ago

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.

okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.