Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combination of android sharedUserId and multik leading to crashes #203

Open
meedovique opened this issue Mar 22, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@meedovique
Copy link

Hi, there is some weird error when using android:sharedUserId="android.uid.system" and importing multik-core + multik-kotlin

  • android:sharedUserId="android.uid.system" with keys and other android or kmp libs works
  • multik also works fine, while there is no android:sharedUserId defined in manifest

Exception in runtime when using .dot

Caused by java.lang.IllegalStateException: Fail to find engine. Consider to add one of the following dependencies: 
 - multik-default
 - multik-kotlin
 - multik-openblas
       at org.jetbrains.kotlinx.multik.api.EngineKt.enginesProvider(Engine.kt:13)
       at org.jetbrains.kotlinx.multik.api.Engine.<clinit>(Engine.kt:68)
       at org.jetbrains.kotlinx.multik.api.Multik.getLinalg(Multik.kt:49)
       at org.jetbrains.kotlinx.multik.api.linalg._linalgKt.dotDefMMNumber(_linalg.kt:21)
       ...

found in both version 0.2.2 and version 0.2.3, happens with sample android project adding just uid + signingConfigs and multik

what do you think could be the cause of such an error?

@devcrocod devcrocod added the bug Something isn't working label Mar 22, 2024
@devcrocod
Copy link
Contributor

Try specifying the dependency directly: multik-kotlin-jvm

I'm not sure what could be causing this error. There are plans to improve android support in the next release

@meedovique
Copy link
Author

i tried add jar files:

  implementation(files("libs/multik-core-jvm-0.2.3.jar"))
  implementation(files("libs/multik-kotlin-jvm-0.2.3.jar"))

that didn't work either

@devcrocod
Copy link
Contributor

you don't need to add jar locally
in this case transitive dependencies may not work

To add, use the regular mechanism:

  implementation("org.jetbrains.kotlinx:multik-core-jvm:0.2.3")
  implementation("org.jetbrains.kotlinx:multik-kotlin-jvm:0.2.3")

For some reason, the ServiceProvider doesn't work
as a workaround, you can call dot directly:

KELinAlg.dot(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants