{"id":2956,"date":"2023-03-27T11:16:20","date_gmt":"2023-03-27T03:16:20","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/2956.html"},"modified":"2023-03-27T11:16:20","modified_gmt":"2023-03-27T03:16:20","slug":"html%e5%88%b6%e4%bd%9capk%e5%b8%b8%e7%94%a8%e5%b7%a5%e5%85%b7%e6%8e%a8%e8%8d%90","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/2956.html","title":{"rendered":"html\u5236\u4f5capk\u5e38\u7528\u5de5\u5177\u63a8\u8350"},"content":{"rendered":"<p>html\u5236\u4f5capk\u662f\u4e00\u79cd\u5c06\u7f51\u9875\u6216\u8005H5\u9879\u76ee\u6253\u5305\u6210\u5b89\u5353\u5e94\u7528\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u5229\u7528HTML\u3001CSS\u548cJavaScript\u7b49\u524d\u7aef\u6280\u672f\u5feb\u901f\u521b\u5efa\u79fb\u52a8\u5e94\u7528\u3002html\u5236\u4f5capk\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u4f8b\u5982\u4f7f\u7528HBuilder\u3001Cordova\u6216\u8005Nativefier\u4ee5\u53ca\u4e00\u95e8APP\u7b49\u5de5\u5177\u3002\u8fd9\u4e9b\u5de5\u5177\u7684\u4f18\u70b9\u662f\u7b80\u5355\u6613\u7528\uff0c\u65e0\u9700\u914d\u7f6e\u590d\u6742\u7684\u5b89\u5353\u5f00\u53d1\u73af\u5883\uff0c\u53ea\u9700\u51e0\u6b65\u64cd\u4f5c\u5c31\u53ef\u4ee5\u751f\u6210apk\u6587\u4ef6\u3002\u7f3a\u70b9\u662f\u53ef\u80fd\u5b58\u5728\u6027\u80fd\u3001\u517c\u5bb9\u6027\u548c\u5b89\u5168\u6027\u7b49\u95ee\u9898\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u573a\u666f\u9009\u62e9\u5408\u9002\u7684\u65b9\u6848\u3002<\/p>\n<p><\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684html\u5236\u4f5capk\u7684\u5de5\u5177\u548c\u6b65\u9aa4\uff1a<\/p>\n<p><\/p>\n<p>&#8211; HBuilder\uff1a<a href=\"https:\/\/www.yimenapp.com\/zhuomian_exe_dabao.html\">\u684c\u9762EXE\u6253\u5305<\/a>HBuilder\u662fDcloud\u516c\u53f8\u51fa\u54c1\u7684\u4e00\u4e2aHTML5\u5f00\u53d1\u5de5\u5177\uff0c\u63d0\u4f9b\u4e86MUI\u6846\u67b6\u548c\u4e91\u7aef\u6253\u5305\u670d\u52a1\u3002\u4f7f\u7528HBuilder\u5236\u4f5capk\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>&#8211; \u5728HBuilder\u4e2d\u521b\u5efa\u4e00\u4e2aapp\u7c7b\u578b\u7684\u9879\u76ee\uff0c\u5220\u9664\u9664\u4e86manifest.json\u4e4b\u5916\u7684\u5176\u4ed6\u6587\u4ef6\uff0c\u7136\u540e\u5c06\u81ea\u5df1\u7684H5\u9879\u76ee\u6587<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/21\/14\/33345161025.jpg\" \/><\/figure>\n<\/p>\n<p>\u4ef6\u5168\u90e8\u590d\u5236\u8fc7\u6765\u3002<\/p>\n<p>&#8211; \u5728manifest.json\u4e2d\u914d\u7f6e\u57fa\u672c\u4fe1\u606f\uff0c\u5982\u5e94\u7528\u540d\u79f0\u3001\u56fe\u6807\u3001\u7248\u672c\u53f7\u3001AppID\u7b49\u3002<\/p>\n<p>&#8211; \u5728\u6a21\u5757\u7ba1\u7406\u4e2d\u9009\u62e9\u9700\u8981\u6253\u5305\u7684\u6a21\u5757\uff0c\u53bb\u6389\u4e0d\u5fc5\u8981\u7684\u6743\u9650\u7533\u8bf7\u3002<\/p>\n<p>&#8211; \u70b9\u51fb\u4e91\u7aef\u6253\u5305\u6309\u94ae\uff0c\u9009\u62e9\u5b89\u5353\u5e73\u53f0\uff0c\u4e0a\u4f20\u9879\u76ee\u6587\u4ef6\u5230\u4e91\u7aef\u670d\u52a1\u5668\u8fdb\u884c\u7f16\u8bd1\u3002<\/p>\n<p>&#8211; \u4e0b\u8f7d\u751f\u6210\u7684apk\u6587\u4ef6\uff0c\u5e76\u8fdb\u884c\u6d4b\u8bd5\u6216\u53d1\u5e03\u3002<\/p>\n<p><\/p>\n<p>&#8211; Cordova\uff1aCordova\u662f\u4e00\u4e2a\u57fa\u4e8eNode.js\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06HTML\u3001CSS\u548cJavaScript\u7b49Web\u6280\u672f\u8f6c\u5316\u6210\u672c\u5730\u5e94\u7528\u7a0b\u5e8f\u3002\u4f7f\u7528Cordova\u5236\u4f5capk\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>&#8211; \u5b89\u88c5Node.js\u548cCordova\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165`npm install -g cordova`\u3002<\/p>\n<p>&#8211; \u521b\u5efa\u4e00\u4e2aCordova\u9879\u76ee\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165`cordova create &lt;project_name&gt; &lt;pack<a href=\"https:\/\/www.yimenapp.com\/wangye_zhuan_app.html\">\u7f51\u9875\u8f6capp<\/a>age_name&gt; &lt;app_name&gt;`\u3002<\/p>\n<p>&#8211; \u5c06\u81ea\u5df1\u7684H5\u9879\u76ee\u6587\u4ef6\u590d\u5236\u5230www\u76ee\u5f55\u4e0b\uff0c\u8986\u76d6\u9ed8\u8ba4\u7684index.html\u6587\u4ef6\u3002<\/p>\n<p>&#8211; \u6dfb\u52a0\u5b89\u5353\u5e73\u53f0\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165`cordova platform add android`\u3002<\/p>\n<p>&#8211; \u6784\u5efa\u5e76\u8fd0\u884c\u9879\u76ee\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165`cordova build android`\u548c`cordova run android`\u3002<\/p>\n<p><\/p>\n<p>&#8211; Nativefier\uff1aNativefier\u662f\u4e00\u4e2a\u57fa\u4e8eElectron\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06\u4efb\u610f\u7f51\u9875\u5c01\u88c5\u6210\u684c\u9762\u5e94\u7528\u6216\u79fb\u52a8\u5e94\u7528\u3002\u4f7f\u7528Nativefier\u5236\u4f5capk\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>&#8211; \u5b89\u88c5Node.js\u548cNativefier\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165`npm install -g nativefier`\u3002<\/p>\n<p>&#8211; \u5c06\u81ea\u5df1\u7684H5\u9879\u76ee\u90e8\u7f72\u5230\u4e00\u4e2a\u53ef\u8bbf\u95ee\u7684\u7f51\u5740\u4e0a\uff0c\u6216\u8005\u5728\u672c\u5730\u542f\u52a8\u4e00\u4e2aWeb\u670d\u52a1\u5668\u3002<\/p>\n<p>&#8211; \u4f7f\u7528Nativefier\u6253\u5305\u7f51\u9875\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165`nativefier &#8211;platform android &lt;url&gt;`\u3002<\/p>\n<p>&#8211; \u4e0b\u8f7d\u751f\u6210\u7684apk\u6587\u4ef6\uff0c\u5e76\u8fdb\u884c\u6d4b\u8bd5\u6216\u53d1\u5e03\u3002<\/p>\n<p><\/p>\n<p>-\u4e00\u95e8APP\uff1a\u4e00\u95e8APP\u662f\u4e00\u6b3e\u5927\u4e2d\u534e\u5730\u533a\u672c\u571f\u5316\u3001\u4e2d\u6587\u5316\u3001\u7b80\u5316\u7684\u4e91\u7aef\u8de8\u5e73\u53f0APP\u5f00\u53d1\u5de5\u5177\uff0c\u652f\u6301\u4e00\u952e\u5728\u7ebf\u5236\u4f5cAPP\uff0c\u7535\u8111\u8f6f\u4ef6\uff0c\u5c0f\u7a0b\u5e8f\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>-\u767b\u5f55\u4e00\u95e8APP\u5f00\u53d1\u5e73\u53f0\u6ce8\u518c\u6210\u4e3a\u4e00\u95e8\u5f00\u53d1\u8005\u3002<\/p>\n<p>-\u5728\u4e00\u95e8\u5f00\u53d1\u8005\u4e2d\u5fc3\u70b9\u51fb\u65b0\u5efaAPP\uff0c\u9009\u62e9\u5f00\u53d1\u6a21\u5f0f\uff0c\u6839\u636e\u9700\u6c42\u9009\u62e9<\/p>\n<p>-\u8bbe\u7f6eAPP\u7684\u56fe\u6807\u542f\u52a8\u56feLOGO\u7b49\u5e38\u89c4\u57fa\u672c\u4fe1\u606f<\/p>\n<p>-\u5728\u914d\u7f6e\u79fb\u52a8\u7aef\u754c\u9762\u9009\u914d\u5f00\u53d1\u529f\u80fd\u6a21\u5757\uff0c\u6bd4\u5982\u539f\u751f\u6807\u9898\u680f\uff0c\u4fa7\u8fb9\u680f\uff0c\u626b\u4e00\u626b\uff0c\u5fae\u4fe1\u767b\u5f55\uff0c\u652f\u4ed8\u5b9d\u652f\u4ed8\u7b49\u7b49<\/p>\n<p>-\u5728\u751f\u6210\u5b89\u88c5\u5305\u754c\u9762\u76f4\u63a5\u6253\u5305\u5236\u4f5c\u5b89\u88c5\u5305\uff0c\u5728\u7ebf\u626b\u7801\u4e0b\u8f7dAPP\u6d4b\u8bd5<\/p>\n<p>-\u6d4b\u8bd5\u6ee1\u610f\u4e4b\u540e\u4e0a\u4f20\u5e94\u7528\u5546\u5e97\u5373\u53ef<\/p>\n<p><\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fhtml\u5236\u4f5capk\u7684\u4e00\u4e9b\u5e38\u89c1\u65b9\u6cd5\u548c\u6b65\u9aa4\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>html\u5236\u4f5capk\u662f\u4e00\u79cd\u5c06\u7f51\u9875\u6216\u8005H5\u9879\u76ee\u6253\u5305\u6210\u5b89\u5353\u5e94\u7528\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u5229\u7528HTML\u3001CSS\u548cJavaScript\u7b49\u524d\u7aef\u6280\u672f\u5feb\u901f\u521b\u5efa\u79fb\u52a8\u5e94\u7528\u3002html\u5236\u4f5capk\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u4f8b\u5982\u4f7f\u7528HBuilde<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[3176,750,3183,2991,802],"class_list":["post-2956","post","type-post","status-publish","format-standard","hentry","category-appshangjia","tag-exe","tag-750","tag-3183","tag-app","tag-802"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/2956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=2956"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/2956\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=2956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=2956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=2956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}