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

你可能感兴趣的:(Vitamio Android7崩溃)