xmcase
xmcase
  • 发布:2015-08-10 11:44
  • 更新:2015-08-10 15:10
  • 阅读:2726

{"code":-1229,"message":"HTML5+ Runtime缺少升级包manifest.json中配置的模块:nativeobj"}

分类:Native.js

升级时提示这个,然后就安装失败,
可是我在模块权限配置里加上了 “Native.js”了,为什么还会提示这个。

2015-08-10 11:44 负责人:无 分享
已邀请:
DCloud_Android_ST

DCloud_Android_ST

是因为你当前升级的基座包缺少nativeobj,你需要把基座包也更新了

  • xmcase (作者)

    基座包要什么升级?

    2015-08-10 13:11

  • xmcase (作者)

    另外实验了一下,IOS版本可以升级,安卓的不能,这是为何?

    2015-08-10 13:18

  • DCloud_Android_ST

    你看一下你的hbuilder版本是不是最新的,安装失败是什么意思

    2015-08-10 13:53

  • xmcase (作者)

    回复 DCloud_Android_ST:我检查了HBUILDER版本,是最新版的,安装失败就是提示{"code":-1229,"message":"HTML5+ Runtime缺少升级包manifest.json中配置的模块:nativeobj"},不懂为什么,安卓下才会这样子。

    2015-08-10 15:08

  • DCloud_Android_ST

    回复 xmcase:把你的代码换一个工程 然后用HBuilder运行一下看看,或者你提供一个工程给我,我帮你查看那一下问题

    2015-08-10 15:13

  • xmcase (作者)

    回复 DCloud_Android_ST:好的,那我先换一个工程试试,

    2015-08-10 15:18

  • xmcase (作者)

    回复 DCloud_Android_ST:新建了个工程,然后把文件拷进去,还是一样的错误,我想请你帮我看下,要什么把工程文件交给你?

    2015-08-10 15:29

  • DCloud_Android_ST

    回复 xmcase:shutao@dcloud.io 邮件

    2015-08-10 15:33

  • DCloud_Android_ST

    6.2版本的基座少配置了 nativeobj,你通过云打包就不会出现这个问题了,下一版本会修复这个问题

    2015-08-10 16:40

  • 望月孤魂

    回复 DCloud_Android_ST:在Android-SDK@1.9.7.20498_20151027版本中还没有修复吗?

    2015-11-05 14:42

  • LeonardoPub

    android离线打包出来有这个问题(HTML5+ Runtime缺少升级包manifest.json中配置的模块:nativeobj),请问如何解决呢??

    2016-01-09 23:06

  • tosmaller

    回复 LeonardoPub:同问,请问这个问题解决了吗,能指导下吗

    2016-04-05 10:05

xmcase

xmcase (作者) - IT男一枚

function installSuccessCB(){  
        plus.nativeUI.closeWaiting();  
        plus.runtime.restart();  
    }  

    function installErrorCB(e){  
        console.log(JSON.stringify(e));  

        plus.nativeUI.closeWaiting();  
        plus.nativeUI.toast("安装失败!",{duration:"long"});  
    }  

    function updateApp(){  

        var netType = plus.networkinfo.getCurrentType();  
        if(netType==2 || netType==0 || netType==1){  
            alert('当前无网络,请等有网络时再更新数据!');  
            return false;  
        }  

        var dtask = plus.downloader.createDownload( baseUrl+"/api/app/gw.wgt", {}, function ( d, status ) {  
            // 下载完成  
            if ( status == 200 ) {   
                //plus.runtime.openFile( d.filename);  
                var appid = plus.runtime.appid;  
                var options = {  
                    'appid':appid,  
                    'force':true  
                }  
                plus.runtime.install( d.filename, options , installSuccessCB, installErrorCB);  
                //console.log( "Download success: " + d.filename );  
            } else {  
                 console.log( "Download failed: " + status );   
            }    
        });  

        dtask.addEventListener( "statechanged", function(task,status){  
        switch(task.state) {  
                case 1: // 开始  
                    //outLine( "开始下载..." );  
                break;  
                case 2: // 已连接到服务器  
                    //outLine( "链接到服务器..." );  
                break;  
                case 3: // 已接收到数据  
                    $("#ds").css("display","");  
                    var percent = parseInt(task.downloadedSize*100/task.totalSize,10);  
                    $("#ds").html(percent);  
                break;  
                case 4: // 下载完成  
                    $("#ds").css("display","none");  
                    localStorage.version = localStorage.new_version;  
                    console.log(localStorage.new_version+"---11111111111");  
                    var nwaiting = plus.nativeUI.showWaiting("更新中,请不要关闭应用");   
                    //outLine( "下载完成!" );  
                break;  
            }  
        } );  

        dtask.start();   

//      plus.io.resolveLocalFileSystemURL( "_www/c.html", function( entry ) {     
//          entry.file( function(file){  
//              var fileReader = new plus.io.FileReader();  
//              //alert("getFile:" + JSON.stringify(file));  
//              fileReader.readAsText(file, 'utf-8');  
//              fileReader.onloadend = function(evt) {  
//                  alert(evt.target.result);  
//              }  
//              //alert(file.size + '--' + file.name);  
//          } );  
//      }, function ( e ) {  
//          alert( "Resolve file URL failed: " + e.message );  
//      } );  
    }

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