Android无法加载vlcjni库(libVLC) [英] Android Can't load vlcjni library (libVLC)

查看:590
本文介绍了Android无法加载vlcjni库(libVLC)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能使用

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

(如果将minifyEnable设置为true).

错误消息是

无法加载vlcjni库:java.lang.UnsatisfiedLinkError:在"/data/app//lib/arm64/libvlcjni.so"中从JNI_OnLoad返回的JNI_ERR

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

如何将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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆