1***@qq.com
1***@qq.com
  • 发布:2022-11-21 14:13
  • 更新:2022-11-21 14:13
  • 阅读:357

#插件讨论# 【 腾讯X5 webview - 狼人残风001 】离线安装失败

分类:uni-app
关联插件: 腾讯X5 webview

离线安装失败

const tbsX5Main = Object;  
var x5webviewmgr = uni.requireNativePlugin("wrs-x5webviewmgr");  
tbsX5Main.mainInit = () =>{  
    var params = {};  
    params.downloadWithoutWifi = true;  
    x5webviewmgr.setDownloadWithoutWifi(params);  
    var resp = x5webviewmgr.isX5Core();  

    console.log(resp)  

    var flag = resp.flag;  
    if(!flag) {  
        x5webviewmgr.reset();  
        let absPath = plus.io.convertLocalFileSystemURL('_www');  
        absPath +='static/x5Core.apk'  
        console.log(absPath)  
        x5webviewmgr.installLocalTbsCore({  
            coreVersion: 46011, // 内核版本  
            path: "absPath"  // 内核路径  
        });  
        x5webviewmgr.setTbsListener((resp)=>{  
            var opt = resp.opt;  
            if(opt == "onDownloadFinish") {  
                //下载结束时的状态,下载成功时errorCode为100,其他均为失败,外部不需要关注具体的失败原因  
                var errCode = resp.errCode;  

            } else if(opt == "onInstallFinish") {  
                 // 安装结束时的状态,安装成功时errorCode为200,其他均为失败,外部不需要关注具体的失败原因  
                var errCode = resp.errCode;  
                console.log(resp)  
                let errTip = x5webviewmgr.getX5CoreLoadHelp();  
                console.log(errTip)  
            }  
        });  
    }  
}  
export default tbsX5Main;

错误码见图

2022-11-21 14:13 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复