离线打包,展示页面时,报如下错
W/System.err: java.lang.NoSuchMethodError: no non-static method "Ltv/danmaku/ijk/media/player/misc/IAndroidIO;.open(Ljava/lang/String;)I"
W/System.err: at java.lang.Runtime.nativeLoad(Native Method)
at java.lang.Runtime.nativeLoad(Runtime.java:1115)
at java.lang.Runtime.loadLibrary0(Runtime.java:1069)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1668)
at tv.danmaku.ijk.media.player.IjkMediaPlayer$a.loadLibrary(IjkMediaPlayer.java:178)
W/System.err: at tv.danmaku.ijk.media.player.IjkMediaPlayer.U(IjkMediaPlayer.java:190)
at io.dcloud.media.video.ijkplayer.media.IjkPlayerView._initMediaPlayer(IjkPlayerView.java:353)
at io.dcloud.media.video.ijkplayer.media.IjkPlayerView.init(IjkPlayerView.java:507)
at io.dcloud.media.video.ijkplayer.VideoPlayerView.<init>(VideoPlayerView.java:56)
at io.dcloud.media.video.DHVideoFrameItem.<init>(DHVideoFrameItem.java:62)
W/System.err: at io.dcloud.media.video.VideoPlayerMgr.createVideoPlayer(VideoPlayerMgr.java:65)
at io.dcloud.media.MediaFeatureImpl.VideoPlayer(MediaFeatureImpl.java:42)
at java.lang.reflect.Method.invoke(Native Method)
at io.dcloud.common.DHInterface.StandardFeature.executeAction(SourceFile:4)
at io.dcloud.common.DHInterface.StandardFeature.execute(SourceFile:1)
at io.dcloud.h.b.a(SourceFile:122)
at io.dcloud.h.b.b(SourceFile:3)
W/System.err: at io.dcloud.h.b.processEvent(SourceFile:144)
at io.dcloud.f.b.c.dispatchEvent(SourceFile:22)
at io.dcloud.common.core.ui.l.processEvent(SourceFile:2)
at io.dcloud.common.core.ui.h.exec(SourceFile:10)
at io.dcloud.common.core.ui.h$a.execute(SourceFile:5)
at io.dcloud.common.adapter.util.MessageHandler$1.handleMessage(SourceFile:3)
at android.os.Handler.dispatchMessage(Handler.java:110)
W/System.err: at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8387)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
E/J4A: J4A_GetMethodID__catchAll: failed: open (Ljava/lang/String;)I
W/System.err: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at io.dcloud.common.DHInterface.StandardFeature.executeAction(SourceFile:4)
at io.dcloud.common.DHInterface.StandardFeature.execute(SourceFile:1)
at io.dcloud.h.b.a(SourceFile:122)
at io.dcloud.h.b.b(SourceFile:3)
at io.dcloud.h.b.processEvent(SourceFile:144)
W/System.err: at io.dcloud.f.b.c.dispatchEvent(SourceFile:22)
at io.dcloud.common.core.ui.l.processEvent(SourceFile:2)
at io.dcloud.common.core.ui.h.exec(SourceFile:10)
at io.dcloud.common.core.ui.h$a.execute(SourceFile:5)
at io.dcloud.common.adapter.util.MessageHandler$1.handleMessage(SourceFile:3)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8387)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
W/System.err: Caused by: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/com.HBuilder.UniPlugin-CAK3ZNo8LRXMa8hhbMklog==/lib/arm/libijksdl.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1668)
at tv.danmaku.ijk.media.player.IjkMediaPlayer$a.loadLibrary(IjkMediaPlayer.java:178)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.U(IjkMediaPlayer.java:190)
at io.dcloud.media.video.ijkplayer.media.IjkPlayerView._initMediaPlayer(IjkPlayerView.java:353)
at io.dcloud.media.video.ijkplayer.media.IjkPlayerView.init(IjkPlayerView.java:507)
at io.dcloud.media.video.ijkplayer.VideoPlayerView.<init>(VideoPlayerView.java:56)
at io.dcloud.media.video.DHVideoFrameItem.<init>(DHVideoFrameItem.java:62)
at io.dcloud.media.video.VideoPlayerMgr.createVideoPlayer(VideoPlayerMgr.java:65)
at io.dcloud.media.MediaFeatureImpl.VideoPlayer(MediaFeatureImpl.java:42)
... 17 more
换了好几个版本,3.0.7、3.1.1都是报这样的错,自己重新编译media-release.aar,也是不行。
请问应该怎么解决
11 个回复
5***@qq.com
文件 proguard-rules.pro
加上这几个 然后在sdk目录添加这两个aar
j***@qq.com
在proguard-rules.pro 中添加
ijkplayer
-keep class tv.danmaku.ijk.media.player.* {;}
-keep class tv.danmaku.ijk.media.player.IjkMediaPlayer{;}
-keep class tv.danmaku.ijk.media.player.ffmpeg.FFmpegApi{;}
狼性做事
这个方法貌似不好使
2021-04-25 19:39
狼性做事 - 奔向远方
Hbuildx 3.1.9 同样遇到这个问题,楼主解决了吗?
狼性做事 - 奔向远方
Hbuildx 3.1.11 离线打包 同样存在这个问题,官方可以确认下啊!!
1***@qq.com
你好,这个问题解决了吗,求大佬指点一下
2021-05-06 10:23
狼性做事
回复 1***@qq.com: 没用uni-app的,我直接写了个android原生播放插件解决的
2021-05-08 14:02
4***@qq.com
我也遇到了此问题,同样是Hbuildx 3.1.9离线打包不能播放,求解
满脑的思绪
+1 ...
gogogwl
离线打包应该是需要添加依赖库到项目里SDK目录下的 DCUniVideoPublic.framework libDCUniVideo.a啥的
ihusr
在proguard-rules.pro 中添加
-keep class tv.danmaku.ijk.media.player.* {;}
c***@qq.com
点赞,太感谢你们了。
强子322
大神么,依赖库在哪里了?找不到所以不知道往哪里加!
c***@qq.com
下载的SDK里面就有了。配合SDK说明,就知道哪个是那个包了
2023-02-06 10:51
l***@163.com
Caused by: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/com.chnenergy.standardapp-8HopUcEQ03HNaHghDA52gg==/lib/arm64/libijksdl.so"