Vitamio Android7崩溃

Vitamio5.02更新android7牛轧糖崩溃

java.lang.UnsatisfiedLinkError:期望库的绝对路径:libstlport_shared.so

阅读mediaplyer.java你会看到Vitamio添加检查SDK_INT在:

public MediaPlayer(Context ctx, boolean preferHWDecoder) { mContext = ctx; String LIB_ROOT; if(VERSION.SDK_INT > 20) { LIB_ROOT = ""; } else{ LIB_ROOT = Vitamio.getLibraryPath(); }

即使SDK_INT> 20,不同手机的实现的库路径可能不同,因此可能会触发java.lang.UnsatisfiedLinkError。

要解决它,修改load_lib库

  private static boolean load_lib(String path, String name){ // if(path==""){ // // System.load(name); // } // else{ // System.load(path + name); // } String libraries[] = {name,Vitamio.getLibraryPath() + name}; boolean success = false; for(String library : libraries) { try{ System.load(library); success = true; break; } catch(UnsatisfiedLinkError e) {} } return true; }

来自 github:yixia/VitamioBundle

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容