本文介绍了Android无法加载vlcjni库(libVLC)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不能使用
implementation 'de.mrmaffen:libvlc-android:2.1.12@aar'
(如果将minifyEnable
设置为true
).
错误消息是
如何将minifyEnable true
与 libvlc 一起使用?
推荐答案
如果混淆了libvlc
,则本机代码无法找到必要的类和方法,因此它返回JNI_ERR
.您只需要从ProGuard
中排除libvlc
,在progaurd
文件中添加此行
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.** { *; }
这篇关于Android无法加载vlcjni库(libVLC)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!