{"id":25631,"date":"2024-06-25T15:30:50","date_gmt":"2024-06-25T07:30:50","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=25631"},"modified":"2024-06-25T15:30:50","modified_gmt":"2024-06-25T07:30:50","slug":"%e6%89%8b%e6%9c%ba%e7%bd%91%e9%a1%b5%e6%89%93%e5%8c%85%e6%88%90app%e6%93%8d%e4%bd%9c%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/25631\/","title":{"rendered":"\u624b\u673a\u7f51\u9875\u6253\u5305\u6210app\u64cd\u4f5c\u6b65\u9aa4"},"content":{"rendered":"

\u5982\u4f55\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\uff08\u539f\u7406\u53ca\u8be6\u7ec6\u4ecb\u7ecd\uff09<\/p>\n

\u968f\u7740\u667a\u80fd\u624b\u673a\u7684\u666e\u53ca\uff0c\u79fb\u52a8\u4e92\u8054\u7f51\u5df2\u7ecf\u6210\u4e3a\u8d8a\u6765\u8d8a\u591a\u4eba\u7684\u65e5\u5e38\u751f\u6d3b\u65b9\u5f0f\u3002\u9488\u5bf9\u8fd9\u4e00\u60c5\u51b5\uff0c\u8bb8\u591a\u4f01\u4e1a\u548c\u4e2a\u4eba\u5e0c\u671b\u5efa\u7acb\u81ea\u5df1\u7684\u624b\u673a\u5e94\u7528\u7a0b\u5e8f\uff08APP\uff09\u3002\u7136\u800c\uff0c\u4e3a\u4e86\u8282\u7701\u6210\u672c\u548c\u5f00\u53d1\u65f6\u95f4\uff0c\u4e0d\u5c11\u4eba\u9009\u62e9\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\uff0c\u91c7\u7528\u7684\u6280\u672f\u539f\u7406\u662fapp\u4e00\u952e\u5236\u4f5c<\/a>\u4ec0\u4e48\u5462?<\/p>\n

1.\u6253\u5305\u7684\u6280\u672f\u539f\u7406 \u2014\u2014 \u6df7\u5408\u5f0f\u5f00\u53d1<\/p>\n

\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\u7684\u6838\u5fc3\u539f\u7406\u662f\u6df7\u5408\u5f0f\u5f00\u53d1\uff08Hybrid Development\uff09\u3002\u6df7\u5408\u5f0f\u5e94\u7528\u7a0b\u5e8f\u662f\u4e00\u79cd\u5728Web\u6280\u672f\uff08\u5982HTML\u3001CSS\u3001JavaScript\uff09\u57fa\u7840\u4e0a\u8fdb\u884c\u5f00\u53d1\uff0c\u7136\u540e\u8fdb\u884c\u5c01\u88c5\uff0c\u6700\u540e\u5728\u5d4c\u5165\u5f0f\u6d4f\u89c8\u5668\uff08\u5982WebView\uff09\u4e2d\u8fd0\u884c\u7684\u7a0b\u5e8f\u3002\u8fd9\u79cd\u65b9\u5f0f\u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u5229\u7528Web\u6280\u672f\u5f00\u53d1\u4e00\u6b21\uff0c\u7136\u540e\u53d1\u5e03\u5230\u5404\u4e2a\u5e73\u53f0\uff08\u5b89\u5353\u3001\u82f9\u679c\u7b49\uff09\uff0c\u5927\u5927\u8282\u7701\u4e86\u5f00\u53d1\u6210\u672c\u548c\u65f6\u95f4\u3002<\/p>\n

\u6df7\u5408\u5f0f\u5f00\u53d1\u5728\u7f51\u9875\u548c\u539f\u751f\u5e94\u7528\u4e4b\u95f4\u5efa\u7acb\u4e86\u4e00\u5ea7\u6865\u6881\u3002\u901a\u8fc7\u6df7\u5408\u5f0f\u5f00\u53d1\uff0c\u53ef\u4ee5\u5c06\u7f51\u9875\u5185\u7684HTML\u3001CSS\u548cJavaScript\u4ee3\u7801\u5d4c\u5165\u5230\u539f\u751f\u5e94\u7528\u4e2d\uff0c\u5f00\u53d1\u8005\u65e0\u9700\u4e3a\u6bcf\u4e2a\u5e73\u53f0\u5355\u72ec\u7f16\u5199\u4ee3\u7801\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u4e13\u6ce8\u4e8e\u6784\u5efa\u7f51\u9875\u5e94\u7528\uff0c\u5e76\u5229\u7528\u6df7\u5408\u5f00\u53d1\u6280\u672f\uff0c\u8f7b\u677e\u5730\u5c06\u5176\u6253\u5305\u6210APP\u3002<\/p>\n

2.\u6253\u5305\u5de5\u5177\u4ecb\u7ecd<\/p>\n

\u8981\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\uff0c\u9996\u5148\u9700\u8981\u4e86\u89e3\u4e00\u4e9b\u5e38\u7528\u7684\u6253\u5305\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e02\u9762\u4e0a\u8f83\u4e3a\u6d41\u884c\u7684\u5de5\u5177\uff1a<\/p>\n

– Cordova\uff08PhoneGap\uff09\uff1aCordova\u662f\u4e00\u6b3e\u5e7f\u6cdb\u4f7f\u7528\u7684\u5f00\u6e90\u6df7\u5408\u5f0f\u5f00\u53d1\u6846\u67b6\uff0c\u4ee5\u524d\u88ab\u79f0\u4e3aPhoneGap\u3002Cordova\u4f7f\u7528WebView\u8fd0\u884cWeb\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u901a\u8fc7\u63d2\u4ef6\u63d0\u4f9b\u4e86\u5bf9\u8bbe\u5907\u529f\u80fd\uff08\u5982\u6444\u50cf\u5934\u3001GPS\u7b49\uff09\u7684\u8bbf\u95ee\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528Cordova\u5c06\u60a8\u7684HTML5\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u591a\u4e2a\u5e73\u53f0\u7684\u539f\u751fAPP\u3002<\/p>\n

– React Native\uff1aReact Native\u662f\u7531Facebook\u63a8\u51fa\u7684\u4e00\u6b3e\u5f00\u6e90\u5e94\u7528\u5f00\u53d1\u6846\u67b6\u3002\u5b83\u5141\u8bb8\u5f00\u53d1\u8005\u4f7f\u7528JavaScript\u548cReact\uff08\u57fa\u4e8eJavaScript\u7684\u5e93\uff09\u6765\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ece\u800c\u5b9e\u73b0\u8de8\u5e73\u53f0\u5171\u4eab\u5927\u90e8\u5206\u4ee3\u7801\u3002\u5c3d\u7ba1React Native\u4e0d\u662f\u7eaf\u7cb9\u7684WebView\u5e94\u7528\uff0c\u4f46\u5b83\u53ef\u4ee5\u5c06Web\u5e94\u7528\u8f6c\u5316\u4e3a\u5177\u6709\u8f83\u9ad8\u539f\u751f\u6027\u80fd\u7684APP\u3002<\/p>\n

– Flutter\uff1aFlutter\u662f\u8c37\u6b4c\u63a8\u51fa\u7684\u4e00\u6b3e\u6df7\u5408\u5f0f\u5e94\u7528\u5f00\u53d1\u6846\u67b6\uff0c\u4f7f\u7528Dart\u8bed\u8a00\u7f16\u5199\u3002\u867d\u7136\u4e0d\u662f\u5b8c\u5168\u5c06Web\u89c6\u56fe\u6253\u5305\u4e3aAPP\uff0c\u4f46\u5b83\u63d0\u4f9b\u4e86\u4f7f\u7528Web\u6280\u672f\u8fdb\u884c\u5f00\u53d1\u7684\u673a\u4f1a\uff0c\u5e76\u786e\u4fdd\u60a8\u751f\u6210\u7684\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5728\u591a\u4e2a\u5e73\u53f0\u4e0a\u8fd0\u884c\u3002<\/p>\n

3.\u6253\u5305\u6b65\u9aa4 \u2014\u2014 \u4ee5Cordova\u4e3a\u4f8b<\/p>\n

\u4ee5\u4e0b\u662f\u4f7f\u7528Cordova\u6253\u5305\u7684\u57fa\u672c\u6b65\u9aa4\uff1a<\/p>\n

a) \u5b89\u88c5Node.js\u5e76\u8bbe\u7f6e\u76f8\u5173\u73af\u5883\u53d8\u91cf\u3002<\/p>\n

b) \u4f7f\u7528npm\uff08Node.js\u81ea\u5e26\uff09\u5b89\u88c5Cordova\uff1a\u8fd0\u884c\u547d\u4ee4`npm install -g\u624b\u673a\u8f6f\u4ef6\u5c01\u88c5<\/a> cordova`\u3002<\/p>\n

c) \u521b\u5efa\u4e00\u4e2a\u65b0\u7684Cordova\u9879\u76ee\uff1a\u8fd0\u884c\u547d\u4ee4`cordova create `\uff0c\u5176\u4e2d\u4e3a\u9879\u76ee\u540d\u79f0\uff0c\u662f\u5e94\u7528\u7a0b\u5e8f\u5305\u540d\uff0c\u4e3a\u5e94\u7528\u7a0b\u5e8f\u663e\u793a\u540d\u79f0\u3002<\/p>\n

d) \u6dfb\u52a0\u5e73\u53f0\uff08\u5b89\u5353\u6216\u82f9\u679c\uff09\uff1a\u8fdb\u5165\u9879\u76ee\u5de5\u7a0b\u76ee\u5f55\uff0c\u8fd0\u884c\u547d\u4ee4`cordova platform add android`\u6216`cordova platform add ios`\u3002<\/p>\n

\n

<\/figure>\n<\/p>\n

e) \u66ff\u6362\u539f\u751f\u5de5\u7a0b\u7684`www`\u6587\u4ef6\u5939\u4e2d\u7684\u6587\u4ef6\uff0c\u5c06\u624b\u673a\u7f51\u9875\u7684HTML\u3001CSS\u3001JS\u6587\u4ef6\u590d\u5236\u5230\u6b64\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n

f) \u6784\u5efa\u3001\u7f16\u8bd1\u548c\u8fd0\u884c\u9879\u76ee\uff1a\u5728\u9879\u76ee\u5de5\u7a0b\u76ee\u5f55\u4e2d\uff0c\u5206\u522b\u6267\u884c\u547d\u4ee4`cordova build`\u3001`cordova compile`\u548c`cordova run`\uff0c\u6216\u8005\u4f7f\u7528IDE\uff08\u5982Android Studio\u6216Xcode\uff09\u6253\u5f00\u5bf9\u5e94\u7684\u5e73\u53f0\u539f\u751f\u5de5\u7a0b\u8fdb\u884c\u7f16\u8bd1\u548c\u8fd0\u884c\u3002<\/p>\n

g) \u5c06\u751f\u6210\u7684APP\u5b89\u88c5\u5230\u624b\u673a\u4e0a\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n

4.\u6ce8\u610f\u4e8b\u9879<\/p>\n

\u867d\u7136\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\u542c\u8d77\u6765\u5f88\u5438\u5f15\u4eba\uff0c\u4f46\u5b83\u4e5f\u6709\u4e00\u4e9b\u7f3a\u70b9\uff0c\u4e3b\u8981\u96c6\u4e2d\u5728\u6027\u80fd\u3001\u7528\u6237\u4f53\u9a8c\u548c\u5e94\u7528\u5546\u5e97\u5ba1\u6838\u7b49\u65b9\u9762\u3002\u56e0\u6b64\uff0c\u5728\u4f7f\u7528\u8fd9\u79cd\u6280\u672f\u65f6\uff0c\u9700\u8981\u6839\u636e\u9879\u76ee\u9700\u6c42\u548c\u5e02\u573a\u7b56\u7565\u6765\u5ba1\u614e\u8bc4\u4f30\u3002<\/p>\n

\u603b\u4e4b\uff0c\u6253\u5305\u6280\u672f\u4e3aWeb\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u5c06\u7f51\u9875\u5e94\u7528\u5feb\u901f\u8f6c\u5316\u4e3a\u539f\u751fAPP\u7684\u9014\u5f84\u3002\u901a\u8fc7\u638c\u63e1\u6df7\u5408\u5f0f\u5f00\u53d1\u7684\u539f\u7406\u4ee5\u53ca\u76f8\u5173\u5de5\u5177\u7684\u4f7f\u7528\uff0c\u60a8\u5c31\u80fd\u4e3a\u7528\u6237\u5e26\u6765\u66f4\u597d\u7684\u79fb\u52a8\u5e94\u7528\u4f53\u9a8c\u3002\u5f53\u7136\uff0c\u6839\u636e\u9879\u76ee\u9700\u6c42\uff0c\u9002\u65f6\u5730\u63a2\u7d22\u5e76\u5b66\u4e60\u5176\u4ed6\u79fb\u52a8\u5e94\u7528\u5f00\u53d1\u6280\u672f\u4e5f\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5982\u4f55\u5c06\u624b\u673a\u7f51\u9875\u6253\u5305\u6210APP\uff08\u539f\u7406\u53ca\u8be6\u7ec6\u4ecb\u7ecd\uff09\u968f\u7740\u667a\u80fd\u624b\u673a\u7684\u666e\u53ca\uff0c\u79fb\u52a8\u4e92\u8054\u7f51\u5df2\u7ecf\u6210\u4e3a\u8d8a\u6765\u8d8a\u591a\u4eba\u7684\u65e5\u5e38\u751f\u6d3b\u65b9\u5f0f\u3002\u9488\u5bf9\u8fd9\u4e00\u60c5\u51b5\uff0c\u8bb8\u591a\u4f01\u4e1a\u548c\u4e2a\u4eba\u5e0c\u671b\u5efa\u7acb\u81ea\u5df1\u7684\u624b\u673a\u5e94\u7528\u7a0b\u5e8f\uff08APP\uff09\u3002\u7136\u800c\uff0c\u4e3a\u4e86\u8282\u7701\u6210\u672c\u548c\u5f00\u53d1<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[9233,25480,12,17,149],"topic":[],"class_list":["post-25631","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-app","tag-iosapp","tag-12","tag-17","tag-149"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/25631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=25631"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/25631\/revisions"}],"predecessor-version":[{"id":25659,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/25631\/revisions\/25659"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=25631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=25631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=25631"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=25631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}