zhoji 发表于 2018-10-19 07:24:40

3分钟把网站打包成安卓/苹果app

文讲解下,如何把一个网站打包成安卓(Android)/苹果(IOS)APP,安装到手机中,并且有完美的用户体验!前提条件:网站是H5网站,或者是手机版网站,总之要能在手机端正常显示才行。准备工具:Hbuilder,或者HbuilderX。下载地址:**** Hidden Message *****安装过程简单,略过。1.只有网址,没有源码,没问题!通过以下步骤,几分钟,将网站变成手机app.(1)打开Hbuilder软件。http://p3.pstatp.com/large/pgc-image/1539855895228d7dbc51907

(2)点击左上角的【文件】/【新建】/【Wap2app】,如图http://p3.pstatp.com/large/pgc-image/1539856105518a186fa6353

点击后如图:http://p9.pstatp.com/large/pgc-image/153985623255644b3c606d9

依次填写,应用名称(比如,盘古软件),wap站首页地址(比如,http://www.cnpangu.cn),此域名可用。点击右下角的【完成】按钮,项目创建成功。软件左侧会出现【盘古软件】项目。http://p99.pstatp.com/large/pgc-image/15398563735658ed7791a7f

(3)打开项目,点击manifest.json文件,http://p3.pstatp.com/large/pgc-image/15398564269119230a2360a

在右侧打开的manifest.json文件中,点击下方标红的【模块权限配置】,如图:http://p9.pstatp.com/large/pgc-image/153985648602158c90c1c6d

按照下图的步骤,先点中红色叉号的模块(比如,Payment(支付)),再点击【删除】按钮。依次将图中的【支付】,【消息推送】,【分享】,【统计】模块删除掉。然后点击软件左上角的【保存】按钮保存。http://p99.pstatp.com/large/pgc-image/15398565710910897631da6

(4) 打包。按照下图步骤,选中项目【盘古软件】,然后点击【发行】菜单,如图:http://p3.pstatp.com/large/pgc-image/15398568926235a34d7964e

再选中【云打包-打包原生安装包】,如图:http://p1.pstatp.com/large/pgc-image/1539856990963fc44f4ffec

点击后,出现以下窗口,可以选择打包安卓(Android)和苹果(ios).打包苹果ios app,需要苹果证书。如果只打包安卓app,取消ios勾选,其他默认。http://p9.pstatp.com/large/pgc-image/15398570452858261fa7da7

按照以下步骤,点击【打包】,再点击【确认没有权限,继续打包】,http://p98.pstatp.com/large/pgc-image/1539857207237355665854b

http://p3.pstatp.com/large/pgc-image/15398572783835682375999

点击【确定】按钮,提示【正在制作安装包】。http://p3.pstatp.com/large/pgc-image/1539857297122459fdb6fc4

等出现绿色文字【打包成功,下载完成】。点击窗口上的蓝色链接【打开下载目录】,就是生成的安卓app包(apk格式),可以直接发送到手机安装。http://p98.pstatp.com/large/pgc-image/1539857440181cc90428c74

http://p3.pstatp.com/large/pgc-image/15398574724957acb90304a

安装到手机上是这样的,http://p1.pstatp.com/large/pgc-image/1539857708116db72848e6a

http://p3.pstatp.com/large/pgc-image/15398576229712b2cc092b3

http://p9.pstatp.com/large/pgc-image/153985762170610cf85f394

http://p3.pstatp.com/large/pgc-image/15398576224679a17482918

打开的效果很完美,比在手机浏览器里打开网页的体验,好很多!功能页面之间的切换,都是手机原生的切屏效果,体验好。2.有源码,当然可以!只要你会前端开发就行。(1)打开Hbuilder软件。http://p3.pstatp.com/large/pgc-image/1539855895228d7dbc51907

(2)点击左上角的【文件】/【新建】/【Wap2app】,如图http://p3.pstatp.com/large/pgc-image/1539856105518a186fa6353

点击后如图:http://p99.pstatp.com/large/pgc-image/1539857978174de96c0f891

点击确定后,项目创建完成,如图:http://p3.pstatp.com/large/pgc-image/153985801078074fd7c4675

在这个工程里,开发人员,可以将自己的html,css,js放入项目。(3),(4)同上。是不是很简单?联系作者,请关注并私信或留言,及时了解更多的干货!http://p3.pstatp.com/large/pgc-image/1539856773703d3abba055e

gommy 发表于 2018-10-19 08:13:37

:(:victory::handshake
页: [1]
查看完整版本: 3分钟把网站打包成安卓/苹果app