Hi everybody, I’ve been using Kotlin/Android for a...
# multiplatform
e
Hi everybody, I’ve been using Kotlin/Android for a while, but I’m new with Kotlin Multiplattform. Could someone point me to instructions for adding Android-specific runtime dependencies to my project? I’m trying to add Skiko; it compiles, but fails at runtime with an
UnsatisfiedLinkError
for libskiko-android-arm64.so. I added
skiko = { module = "org.jetbrains.skiko:skiko", version = "0.7.89.1" }
to my libs.versions.toml, and
implementation(_libs_._skiko_)
to my
androidMain.dependencies
source-set. Is there something extra I need to add to my packaging so that it will find the library at runtime?
l
You'll find android-only libraries in the
androidMain
source set only. Btw, isn't skiko multiplatform, that is, needs to be added to
commonMain
?
e
That’s the problem. I’ve added it to
androidMain
. But it fails to find the .so file at runtime.
s
I also want to use Skiko for Android to not have a separate implementation for Android of a specific logic. Isn't there any way to do that? I looked on https://search.maven.org/search?q=org.jetbrains.skiko, but there are no Android versions published. https://github.com/JetBrains/skiko/issues/800#issuecomment-1751777521
I now did a equivalent implementation, but of course the results differ a bit. The scaled bitmap on Android is not the same pixels as skiko produces. So Ashampoo Photos has different results for pHash calculation on Android. 😕