起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2110|回复: 2

[结贴] 视频 cordova插件 闪退

[复制链接]

50

主题

199

帖子

820

积分

高级会员

Rank: 4

积分
820
QQ
发表于 2017-7-6 18:51:08 | 显示全部楼层 |阅读模式
版本:5.3.7
概要:
        引用了阿里的视频直播sdk,封装为标准cordova插件,运行后闪退。
ddms日志:
07-06 18:36:36.225: E/loaderror(3639): TBS:302
07-06 18:36:36.265: E/SDKEngine(3639): TBS:init failure: can_load_x5=false; is_compatible=true; isTbsCoreLegaL=true
07-06 18:36:36.275: E/SDKEngine(3639): TBS:useSystemWebView by !canLoadTbs
07-06 18:36:36.295: E/loaderror(3639): TBS:324
07-06 18:36:36.305: E/QbSdk(3639): TBS:sys WebView: SysWebViewForcedInner
07-06 18:37:21.355: E/dalvikvm(3639): ERROR: couldn't find native method
07-06 18:37:21.355: E/dalvikvm(3639): Requested: Lcom/alivc/player/TBMPlayer;.mpPrepareLjava/lang/String;II)I
07-06 18:37:21.355: E/dalvikvm(3639): Candidate: Lcom/alivc/player/TBMPlayer;.mpPrepareLjava/lang/String;IILjava/lang/String;)I
07-06 18:37:21.365: E/AndroidRuntime(3639): FATAL EXCEPTION: main
07-06 18:37:21.365: E/AndroidRuntime(3639): Process: com.XLCLoud, PID: 3639
07-06 18:37:21.365: E/AndroidRuntime(3639): java.lang.NoSuchMethodError: no static or non-static method "Lcom/alivc/player/TBMPlayer;.mpPrepare(Ljava/lang/String;II)I"
07-06 18:37:21.365: E/AndroidRuntime(3639):         at java.lang.Runtime.nativeLoad(Native Method)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at java.lang.Runtime.doLoad(Runtime.java:421)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at java.lang.Runtime.loadLibrary(Runtime.java:362)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at java.lang.System.loadLibrary(System.java:526)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.alivc.player.TBMPlayer.<clinit>(TBMPlayer.java:30)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.alivc.player.AliVcMediaPlayer.getMPlayer(AliVcMediaPlayer.java:260)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.alivc.player.AliVcMediaPlayer.setSurfaceView(AliVcMediaPlayer.java:553)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.alivc.player.AliVcMediaPlayer.<init>(AliVcMediaPlayer.java:174)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.***.PlayerPlugin.startToPlay(PlayerPlugin.java:197)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.***.PlayerPlugin.access$100(PlayerPlugin.java:30)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.***.PlayerPlugin$4.surfaceCreated(PlayerPlugin.java:177)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.SurfaceView.updateWindow(SurfaceView.java:572)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.SurfaceView.access$000(SurfaceView.java:86)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:175)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1895)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1024)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5694)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.Choreographer.doCallbacks(Choreographer.java:574)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.Choreographer.doFrame(Choreographer.java:544)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.os.Handler.handleCallback(Handler.java:733)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.os.Handler.dispatchMessage(Handler.java:95)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.os.Looper.loop(Looper.java:136)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at android.app.ActivityThread.main(ActivityThread.java:5019)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at java.lang.reflect.Method.invokeNative(Native Method)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at java.lang.reflect.Method.invoke(Method.java:515)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-06 18:37:21.365: E/AndroidRuntime(3639):         at dalvik.system.NativeStart.main(Native Method)


插件文文件 PlayerPlugin.zip (3.44 KB, 下载次数: 176)
发表于 2017-7-7 09:54:37 | 显示全部楼层
不是打包时报错!而是运行时报错对吗?
先使用原生开发的方式!APP中运行没问题了!再封装成corodva 插件!
corodva只不过是通过  js调用原生代码而已!  先保证原生代码本身运行 是正常的!  插件一般打包正常!就没问题!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

50

主题

199

帖子

820

积分

高级会员

Rank: 4

积分
820
QQ
 楼主| 发表于 2017-7-10 10:39:44 | 显示全部楼层
解决了,谢谢
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-24 12:13 , Processed in 0.071177 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表