Android Can't load vlcjni library (libVLC)

有些话、适合烂在心里 提交于 2019-12-13 03:47:02

问题


I can't use

implementation 'de.mrmaffen:libvlc-android:2.1.12@aar' 

if the set minifyEnable to true.

The error message is

Can't load vlcjni library: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app//lib/arm64/libvlcjni.so"

How can I use minifyEnable true with libvlc?


回答1:


if you obfuscate the libvlc there is no way for the native code to find the necessary classes and methods so it returns a JNI_ERR. You just need to exclude the libvlc from ProGuard, add this line in progaurd file

-keep class org.videolan.libvlc.** { *; } 


来源:https://stackoverflow.com/questions/52571279/android-cant-load-vlcjni-library-libvlc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!