Jzvd / JZVideo

高度自定义的安卓视频框架 MediaPlayer exoplayer ijkplayer ffmpeg
MIT License
2.89k stars 524 forks source link

android11 IjkMediaPlayer报错 #337

Closed tudoutiao closed 3 years ago

tudoutiao commented 3 years ago

看到ijkplayer在Android11上兼容性有问题https://github.com/bilibili/ijkplayer/issues/5202

Process: com.gozap.chouti, PID: 7134 java.lang.UnsatisfiedLinkError: dlopen failed: library "libijkffmpeg.so" not found at java.lang.Runtime.loadLibrary0(Runtime.java:1087) at java.lang.Runtime.loadLibrary0(Runtime.java:1008) at java.lang.System.loadLibrary(System.java:1664) at tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:179) at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:190) at tv.danmaku.ijk.media.player.IjkMediaPlayer.initPlayer(IjkMediaPlayer.java:231) at tv.danmaku.ijk.media.player.IjkMediaPlayer.(IjkMediaPlayer.java:227) at tv.danmaku.ijk.media.player.IjkMediaPlayer.(IjkMediaPlayer.java:218) at cn.jzvd.CustomMedia.JZMediaIjk.lambda$prepare$0$JZMediaIjk(JZMediaIjk.java:44) at cn.jzvd.CustomMedia.-$$Lambda$JZMediaIjk$hSKSV5GlNKtxhxlAZ8DhUNbpeGY.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.os.HandlerThread.run(HandlerThread.java:67)

tudoutiao commented 3 years ago

解决了 implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8' implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8'

JasonXiang2014 commented 3 years ago

https://github.com/CarGuo/GSYVideoPlayer/issues/3126#issuecomment-772287619 fyi