在引用vitamio后,進入到播放的activity,程序會崩潰,下面是錯誤信息。
? ? ? ? ? ? ? ? ? --------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
? ? ? ? ? ? ? ? ? Process: com.xie.com.imoocmusic, PID: 3160
? ? ? ? ? ? ? ? ? java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: libstlport_shared.so
? ? ? ? ? ? ? ? ? ? ? at java.lang.Runtime.load0(Runtime.java:920)
? ? ? ? ? ? ? ? ? ? ? at java.lang.System.load(System.java:1633)
? ? ? ? ? ? ? ? ? ? ? at io.vov.vitamio.MediaPlayer.<clinit>(MediaPlayer.java:369)
? ? ? ? ? ? ? ? ? ? ? at io.vov.vitamio.widget.VideoView.openVideo(VideoView.java:427)
? ? ? ? ? ? ? ? ? ? ? at io.vov.vitamio.widget.VideoView.access$1400(VideoView.java:70)
? ? ? ? ? ? ? ? ? ? ? at io.vov.vitamio.widget.VideoView$3.surfaceCreated(VideoView.java:158)
? ? ? ? ? ? ? ? ? ? ? at android.view.SurfaceView.updateSurface(SurfaceView.java:670)
? ? ? ? ? ? ? ? ? ? ? at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:143)
? ? ? ? ? ? ? ? ? ? ? at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
? ? ? ? ? ? ? ? ? ? ? at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2474)
? ? ? ? ? ? ? ? ? ? ? at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
? ? ? ? ? ? ? ? ? ? ? at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
? ? ? ? ? ? ? ? ? ? ? at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
? ? ? ? ? ? ? ? ? ? ? at android.view.Choreographer.doCallbacks(Choreographer.java:761)
? ? ? ? ? ? ? ? ? ? ? at android.view.Choreographer.doFrame(Choreographer.java:696)
? ? ? ? ? ? ? ? ? ? ? at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
? ? ? ? ? ? ? ? ? ? ? at android.os.Handler.handleCallback(Handler.java:873)
? ? ? ? ? ? ? ? ? ? ? at android.os.Handler.dispatchMessage(Handler.java:99)
? ? ? ? ? ? ? ? ? ? ? at android.os.Looper.loop(Looper.java:193)
? ? ? ? ? ? ? ? ? ? ? at android.app.ActivityThread.main(ActivityThread.java:6669)
? ? ? ? ? ? ? ? ? ? ? at java.lang.reflect.Method.invoke(Native Method)
? ? ? ? ? ? ? ? ? ? ? at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
? ? ? ? ? ? ? ? ? ? ? at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/Process: Sending signal. PID: 3160 SIG: 9
Application terminated.
2019-07-08
問題已經解決。我重新下載了as的vitamio版本,以module的形式導入,直接就可以播放了。也不用判斷版本,修改SDK。