-
Notifications
You must be signed in to change notification settings - Fork 210
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
Android Release apk throw UnsatisfiedLinkError #222
Comments
after add rule -keep class com.sun.jna.** { *; } in proguard-rules.pro file.it turns to another exception |
Hi You likely need to edit minify project properties to keep required jni files. See here |
same question in vosk-android-demo |
should add blew rule both |
this is not enough, I tried adding it and it still crashes Native library (com/sun/jna/android-arm/libjnidispatch.so) not found in resource path (.) |
try clean your project and rebuild , check the dependency |
vosk run successfully on debug,but release apk crush.
Error Detail:
java.lang.UnsatisfiedLinkError: Can't obtain class com.sun.jna.Pointer
at com.sun.jna.Native.initIDs(Native Method)
at com.sun.jna.Native.(:7)
at com.sun.jna.Native.a()
at org.vosk.LibVosk.()
at org.vosk.LibVosk.vosk_model_new(Native Method)
at e.b.a.()
at e.b.c.k.a()
at e.b.c.f.run(lambda)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Dependency already implementation 'net.java.dev.jna:jna:5.13.0@aar'
implementation 'com.alphacephei:vosk-android:0.3.47@aar'
The text was updated successfully, but these errors were encountered: