--------- 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.
问题已经解决。我重新下载了as的vitamio版本,以module的形式导入,直接就可以播放了。也不用判断版本,修改SDK。
android { compileSdkVersion 26 defaultConfig { applicationId "com.xie.com.imoocmusic" minSdkVersion 17 targetSdkVersion 28 versionCode 2 versionName "2.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation 'com.android.support:support-v4:26.1.0' compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':vitamio') compile 'com.android.support:appcompat-v7:26+' compile 'com.android.support:recyclerview-v7:26+' compile 'com.android.support:design:26+' compile 'com.github.bumptech.glide:glide:3.7.0' compile 'jp.wasabeef:glide-transformations:3.0.1' compile 'de.hdodenhof:circleimageview:3.0.0' compile 'com.android.support.constraint:constraint-layout:1.1.3' compile 'com.alibaba:fastjson:1.1.52.android' compile 'com.blankj:utilcode:1.11.1' compile 'org.igniterealtime.smack:smack-android:4.1.4' compile 'org.igniterealtime.smack:smack-tcp:4.1.4' compile 'org.igniterealtime.smack:smack-im:4.1.4' compile 'org.igniterealtime.smack:smack-extensions:4.1.4' }