{"id":9076,"date":"2023-11-21T18:34:14","date_gmt":"2023-11-21T10:34:14","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=9076"},"modified":"2023-11-21T18:34:14","modified_gmt":"2023-11-21T10:34:14","slug":"%e5%b0%86%e7%bd%91%e9%a1%b5%e7%94%9f%e6%88%90app%e6%9c%89%e9%82%a3%e4%ba%9b%e6%96%b9%e5%bc%8f%e6%96%b9%e6%b3%95%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/9076\/","title":{"rendered":"\u5c06\u7f51\u9875\u751f\u6210app\u6709\u90a3\u4e9b\u65b9\u5f0f\u65b9\u6cd5\uff1f"},"content":{"rendered":"
\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u5c06\u60a8\u7684\u7f51\u9875\u751f\u6210\u4e3aApp\uff0c\u4ee5\u4fbf\u5728\u79fb\u52a8\u8bbe\u5907\u548c\u684c\u9762\u5e73\u53f0\u4e0a\u4f7f\u7528\u3002\u672c\u6559\u7a0b\u5c06\u4fa7\u91cd\u4e8e\u4f7f\u7528\u539f\u751f\u5e94\u7528\u5bb9\u5668\u628a\u73b0\u6709\u7f51\u9875\u5c01\u88c5\u4e3aApp\u7684\u65b9\u6cd5\uff0c\u540c\u65f6\u8fd8\u5c06\u4ecb\u7ecd\u7b80\u8981\u7684\u539f\u7406\u3002<\/p>\n
\u4e00\u3001\u539f\u7406<\/p>\n
\u5c06\u7f51\u9875\u751f\u6210\u4e3aApp\u6d89\u53ca\u5230\u4f7f\u7528\u539f\u751f\u5e94\u7528\u5bb9\u5668\uff0c\u50cfApache Cordova\u3001PhoneGap\u6216\u8005React Native\u8fd9\u6837\u7684\u5f00\u53d1\u6846\u67b6\uff0c\u5c06\u60a8\u7684\u7f51\u9875\u5c01\u88c5\u8fdbApp\u4e2d\u3002\u8fd9\u6837\uff0c\u5e94\u7528\u7a0b\u5e8f\u5c31\u53ef\u4ee5\u50cf\u8bbf\u95ee\u672c\u5730\u8d44\u6e90\u4e00\u6837\u65b9\u4fbf\u5730\u52a0\u8f7d\u548c\u663e\u793a\u60a8\u7684\u7f51\u9875\u5185\u5bb9\u3002\u539f\u751f\u5e94\u7528\u5bb9\u5668\u5177\u6709\u8bbf\u95ee\u8bbe\u5907API\u7684\u80fd\u529b\uff0c\u4f8b\u5982\u6444\u50cf\u5934\u3001\u4f4d\u7f6e\u4fe1\u606f\u548c\u63a8\u9001\u901a\u77e5\u7b49\u7b49\u3002<\/p>\n
\u4e8c\u3001\u5b9e\u73b0<\/p>\n
\u4e0b\u9762\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7Apache Cordova\u5c06\u7f51\u9875\u751f\u6210App\u7684\u5177\u4f53\u6b65\u9aa4\u3002\u56e0\u4e3aApache Cordova\u662f\u6700\u6d41\u884c\u4e14\u6613\u4e8e\u4e0a\u624b\u7684\u65b9\u6848\u4e4b\u4e00\uff0c\u540c\u65f6\u652f\u6301Andro\u5728\u7ebf\u56fe\u7247\u94fe\u63a5\u751f\u6210\u5668app<\/a>id\u548ciOS\u3002<\/p>\n 1. \u5b89\u88c5Node.js\u548cnpm<\/p>\n \u8981\u4f7f\u7528Cordova\uff0c\u9996\u5148\u9700\u8981\u5728\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Node.js\u548cnpm\uff08Node\u5305\u7ba1\u7406\u5668\uff09\u3002\u53ef\u4ee5\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\uff1ahttps:\/\/nodejs.org\/<\/p>\n 2. \u5b89\u88c5Cordova<\/p>\n \u5b89\u88c5\u5b8cNode.js\u4e4b\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u5168\u5c40\u5b89\u88c5Cordova\uff1a<\/p>\n “`sh<\/p>\n npm install -g cordova<\/p>\n “`<\/p>\n 3. \u521b\u5efaCordova\u9879\u76ee<\/p>\n \u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Cordova\u9879\u76ee\uff1a<\/p>\n “`sh<\/p>\n cordova create MyApp com.mydomain.myapp MyApp<\/p>\n “`<\/p>\n \u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cMyApp\u201d\u7684\u65b0\u9879\u76ee\u6587\u4ef6\u5939\u3002\u9879\u76ee\u540d\u79f0\u3001\u5e94\u7528\u7684\u9006\u5411\u57df\u540d\u8bc6\u522b\u6807\u8bc6\u7b26\u4ee5\u53ca\u663e\u793a\u540d\u79f0\u53ef\u4ee5\u81ea\u884c\u66f4\u6539\u3002<\/p>\n 4. \u6dfb\u52a0\u76ee\u6807\u5e73\u53f0<\/p>\n