解决方案 »

  1.   

    PhoneGap 不也是基于移动终端上内嵌的浏览器即WebView来渲染解析HTML?
      

  2.   


    是是是吧,但听说PhoneGap有打包功能,好像请详细说明下
      

  3.   

    批量打包生成apk,我们已经实现了,在外网的linux服务器上都部署好了
    @Test
    public void unpack() {// 四个参数依次为:应用ID,应用名称,应用图标,包装的网站url
    String response = request(
    "http://192.168.1.42:8080/apk/tool/unpack.htm",
    getParams(new String[] { "appId", "appName", "iconUrl", "url" }, new Object[] { "12", "百度",
    "http://img0.bdstatic.com/img/image/shouye/dengni31.jpg", "http://www.baidu.com" }));
    response = ToolUtil.gunzip(response);
    System.out.println(response);
    if (ToolUtil.isBlank(response)) {
    System.out.println("未登录或登录超时,调用接口");
    return;
    }
    Map<String, Object> map = GsonUtils.fromJson(response, Map.class);
    Assert.assertTrue((String) map.get("message"), (Boolean) map.get("success"));
    }运行这段代码后,控制台输出:
    {"data":{"result":"http://file.taocaiku.com/20140528331549.apk"},"message":"操作成功","success":true}如果有疑问,你可以根据http://file.taocaiku.com/20140528331549.apk下载文件安装试一下