-
Notifications
You must be signed in to change notification settings - Fork 16
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 UnsatisfiedLinkError in release builds with R8 #172
Comments
It looks like the native library is missing, make sure to build with the DSL option |
In my build.gradle:
AndroidManifest.xml:
Then I have got a ConnectionScreen, where I connect to the device and this is where it immediately crashes:
The CastService.java Class is taken from the Demo App. |
The Clarius Cast Example Project also crashes when enabling the minifier in the build.gradle app. I used the same API version.
|
I was able to reproduce but I do not have a fix for |
Will there be a fix anytime soon for this problem ? |
It is not planned for now sorry. |
When I use the Cast API in a release build that uses R8, I get this exception:
java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/~~64wYiOChoMGh9JTT1t63Ag==/at.alysis.nofuss-IM--hyxOpz9yLfhKeMp5MA==/lib/arm64/libQt6Core_arm64-v8a.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1661)
at me.clarius.sdk.Cast.(SourceFile:3)
at at.alysis.nofuss.service.clarius.CastService.onCreate(Unknown Source:28)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:5098)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2506)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
In the proguard-rules.pro File I added these lines:
-keep class me.clarius.sdk.** { ; }
-keep class at.alysis.nofuss.service.clarius.* { *; } // package where all the cast api calls are made
I currently use version v.11.1.0. Debug builds work fine.
The text was updated successfully, but these errors were encountered: