{"id":113994,"date":"2026-10-08T07:49:53","date_gmt":"2026-10-07T23:49:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/113994.html"},"modified":"2026-10-08T07:49:53","modified_gmt":"2026-10-07T23:49:53","slug":"%e9%b8%bf%e8%92%99%e7%b3%bb%e7%bb%9f%e5%ba%94%e7%94%a8%e5%b8%82%e5%9c%ba%e6%9b%b4%e6%96%b0%e5%8a%9f%e8%83%bd%e8%af%a6%e8%a7%a3%e4%b8%8e%e5%bc%80%e5%8f%91%e9%80%82%e9%85%8d%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/113994.html","title":{"rendered":"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357"},"content":{"rendered":"<h2>\u529f\u80fd\u6982\u8ff0<\/h2>\n<p>\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u662f\u534e\u4e3a\u5e94\u7528\u5e02\u573a\u670d\u52a1&#xff08;AppGallery Kit&#xff09;\u9762\u5411\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u4e00\u9879\u5f00\u653e\u80fd\u529b&#xff0c;\u4e3b\u8981\u670d\u52a1\u4e8e\u5df2\u5728\u5e94\u7528\u5e02\u573a\u4e0a\u67b6\u7684\u5e94\u7528\u3002\u8be5\u529f\u80fd\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u5e94\u7528\u5185\u90e8\u96c6\u6210\u7248\u672c\u68c0\u6d4b\u4e0e\u66f4\u65b0\u63d0\u9192\u903b\u8f91&#xff0c;\u5e2e\u52a9\u7528\u6237\u53ca\u65f6\u5c06\u5e94\u7528\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\u3002<\/p>\n<p>\u901a\u8fc7\u8be5\u529f\u80fd&#xff0c;\u5f00\u53d1\u8005\u65e0\u9700\u81ea\u884c\u642d\u5efa\u7248\u672c\u7ba1\u7406\u670d\u52a1\u5668\u3001\u7ef4\u62a4\u7248\u672c\u4fe1\u606f\u3001\u5904\u7406\u4e0b\u8f7d\u8df3\u8f6c\u7b49\u590d\u6742\u903b\u8f91&#xff0c;\u53ea\u9700\u8c03\u7528\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u63d0\u4f9b\u7684\u63a5\u53e3&#xff0c;\u5373\u53ef\u5b8c\u6210\u4ee5\u4e0b\u6838\u5fc3\u64cd\u4f5c&#xff1a;<\/p>\n<ul>\n<li>\u68c0\u6d4b\u5f53\u524d\u8bbe\u5907\u4e0a\u5b89\u88c5\u7684\u5e94\u7528\u7248\u672c\u662f\u5426\u4f4e\u4e8e\u5e94\u7528\u5e02\u573a\u5728\u67b6\u7248\u672c\u3002<\/li>\n<li>\u5982\u679c\u5b58\u5728\u65b0\u7248\u672c&#xff0c;\u8c03\u7528\u7cfb\u7edf\u5347\u7ea7\u5bf9\u8bdd\u6846\u63d0\u793a\u7528\u6237\u8fdb\u884c\u5347\u7ea7\u3002<\/li>\n<li>\u83b7\u53d6\u5347\u7ea7\u5bf9\u8bdd\u6846\u7684\u663e\u793a\u7ed3\u679c&#xff0c;\u4fbf\u4e8e\u5f00\u53d1\u8005\u8fdb\u884c\u540e\u7eed\u4e1a\u52a1\u5904\u7406\u3002<\/li>\n<\/ul>\n<p>\u8be5\u529f\u80fd\u6709\u6548\u63d0\u5347\u4e86\u5e94\u7528\u5185\u66f4\u65b0\u63d0\u9192\u7684\u4fbf\u6377\u6027\u548c\u4e00\u81f4\u6027&#xff0c;\u51cf\u5c11\u4e86\u7528\u6237\u56e0\u7248\u672c\u8fc7\u65e7\u800c\u9047\u5230\u7684\u529f\u80fd\u7f3a\u5931\u6216\u517c\u5bb9\u6027\u95ee\u9898&#xff0c;\u540c\u65f6\u4e5f\u5e2e\u52a9\u5f00\u53d1\u8005\u63d0\u9ad8\u65b0\u7248\u672c\u7684\u5206\u53d1\u6548\u7387\u3002<\/p>\n<h2>\u9002\u7528\u573a\u666f<\/h2>\n<p>\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u9002\u7528\u4e8e\u4ee5\u4e0b\u4e24\u7c7b\u4e3b\u8981\u573a\u666f&#xff1a;<\/p>\n<h3>\u5e94\u7528\u542f\u52a8\u81ea\u52a8\u68c0\u6d4b<\/h3>\n<p>\u5f53\u5e94\u7528\u542f\u52a8\u5b8c\u6210\u540e&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5e94\u7528\u521d\u59cb\u5316\u9636\u6bb5\u8c03\u7528\u68c0\u67e5\u66f4\u65b0\u63a5\u53e3&#xff0c;\u67e5\u8be2\u5f53\u524d\u5e94\u7528\u662f\u5426\u6709\u53ef\u66f4\u65b0\u7684\u7248\u672c\u3002\u5982\u679c\u5b58\u5728\u65b0\u7248\u672c&#xff0c;\u53ef\u8fdb\u4e00\u6b65\u8c03\u7528\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u63a5\u53e3&#xff0c;\u63d0\u9192\u7528\u6237\u66f4\u65b0\u3002<\/p>\n<p>\u8fd9\u79cd\u573a\u666f\u5e38\u89c1\u4e8e\u5bf9\u7248\u672c\u53ca\u65f6\u6027\u8981\u6c42\u8f83\u9ad8\u7684\u5e94\u7528&#xff0c;\u4f8b\u5982\u5b89\u5168\u7c7b\u3001\u91d1\u878d\u7c7b\u3001\u5373\u65f6\u901a\u8baf\u7c7b\u5e94\u7528\u3002\u5728\u7528\u6237\u6253\u5f00\u5e94\u7528\u65f6\u81ea\u52a8\u68c0\u6d4b\u66f4\u65b0&#xff0c;\u53ef\u4ee5\u5728\u7b2c\u4e00\u65f6\u95f4\u5f15\u5bfc\u7528\u6237\u5347\u7ea7&#xff0c;\u907f\u514d\u7528\u6237\u56e0\u7248\u672c\u8fc7\u65e7\u800c\u65e0\u6cd5\u4f7f\u7528\u5173\u952e\u529f\u80fd\u6216\u5b58\u5728\u5b89\u5168\u98ce\u9669\u3002<\/p>\n<h3>\u7528\u6237\u4e3b\u52a8\u68c0\u67e5\u66f4\u65b0<\/h3>\n<p>\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u5e94\u7528\u7684\u201c\u8bbe\u7f6e\u201d\u3001\u201c\u5173\u4e8e\u201d\u6216\u201c\u5e2e\u52a9\u201d\u9875\u9762\u63d0\u4f9b\u201c\u68c0\u67e5\u66f4\u65b0\u201d\u5165\u53e3\u3002\u7528\u6237\u70b9\u51fb\u8be5\u5165\u53e3\u540e&#xff0c;\u5e94\u7528\u8c03\u7528\u68c0\u67e5\u66f4\u65b0\u63a5\u53e3&#xff0c;\u5e76\u6839\u636e\u8fd4\u56de\u7ed3\u679c\u51b3\u5b9a\u662f\u5426\u5f39\u51fa\u5347\u7ea7\u5bf9\u8bdd\u6846\u3002<\/p>\n<p>\u8fd9\u79cd\u573a\u666f\u7ed9\u4e88\u4e86\u7528\u6237\u66f4\u591a\u7684\u81ea\u4e3b\u6743&#xff0c;\u9002\u5408\u4e0d\u5e0c\u671b\u9891\u7e41\u6253\u6270\u7528\u6237\u7684\u5de5\u5177\u7c7b\u3001\u5185\u5bb9\u7c7b\u5e94\u7528\u3002\u7528\u6237\u5728\u6709\u9700\u8981\u65f6\u4e3b\u52a8\u89e6\u53d1\u68c0\u67e5&#xff0c;\u4f53\u9a8c\u66f4\u52a0\u53cb\u597d\u3002<\/p>\n<p>\u65e0\u8bba\u662f\u81ea\u52a8\u68c0\u6d4b\u8fd8\u662f\u7528\u6237\u4e3b\u52a8\u89e6\u53d1&#xff0c;\u6838\u5fc3\u6d41\u7a0b\u4e00\u81f4&#xff1a;\u5148\u68c0\u67e5&#xff0c;\u540e\u63d0\u9192\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u81ea\u8eab\u4ea7\u54c1\u7684\u4ea4\u4e92\u8bbe\u8ba1&#xff0c;\u7075\u6d3b\u9009\u62e9\u89e6\u53d1\u65f6\u673a\u3002<\/p>\n<h2>\u4e1a\u52a1\u6d41\u7a0b<\/h2>\n<p>\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u7684\u6574\u4f53\u4e1a\u52a1\u6d41\u7a0b\u53ef\u4ee5\u6982\u62ec\u4e3a\u4ee5\u4e0b\u56db\u4e2a\u6b65\u9aa4&#xff1a;<\/p>\n<li>\n<p>\u5e94\u7528\u8c03\u7528\u68c0\u67e5\u66f4\u65b0\u63a5\u53e3<br \/>\n\u5e94\u7528\u901a\u8fc7 checkAppUpdate \u63a5\u53e3\u5411\u5347\u7ea7\u670d\u52a1\u53d1\u8d77\u8bf7\u6c42&#xff0c;\u4f20\u5165\u5f53\u524d UIAbility \u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\u3002<\/p>\n<\/li>\n<li>\n<p>\u5347\u7ea7\u670d\u52a1 API \u8fd4\u56de\u662f\u5426\u6709\u65b0\u7248\u672c<br \/>\n\u5347\u7ea7\u670d\u52a1\u6839\u636e\u5e94\u7528\u5305\u540d\u3001\u7248\u672c\u53f7\u3001\u7b7e\u540d\u4fe1\u606f\u7b49\u6761\u4ef6\u8fdb\u884c\u5224\u65ad&#xff0c;\u8fd4\u56de CheckUpdateResult \u7ed3\u679c\u5bf9\u8c61\u3002\u5176\u4e2d updateAvailable \u5c5e\u6027\u8868\u793a\u662f\u5426\u5b58\u5728\u53ef\u66f4\u65b0\u7248\u672c\u3002<\/p>\n<\/li>\n<li>\n<p>\u5e94\u7528\u8c03\u7528\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u63a5\u53e3<br \/>\n\u5982\u679c\u68c0\u67e5\u7ed3\u679c\u8868\u660e\u5b58\u5728\u65b0\u7248\u672c&#xff0c;\u5e94\u7528\u53ef\u4ee5\u8c03\u7528 showUpdateDialog \u63a5\u53e3&#xff0c;\u8bf7\u6c42\u7cfb\u7edf\u5f39\u51fa\u5347\u7ea7\u5bf9\u8bdd\u6846\u3002<\/p>\n<\/li>\n<li>\n<p>\u5347\u7ea7\u670d\u52a1 API \u5411\u5e94\u7528\u8fd4\u56de\u663e\u793a\u7ed3\u679c<br \/>\n\u7cfb\u7edf\u6839\u636e\u5f53\u524d\u72b6\u6001\u5c55\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846&#xff0c;\u5e76\u5c06\u663e\u793a\u7ed3\u679c\u4ee5 ShowUpdateResultCode \u5f62\u5f0f\u8fd4\u56de\u7ed9\u5e94\u7528\u3002\u5f00\u53d1\u8005\u53ef\u636e\u6b64\u5224\u65ad\u5bf9\u8bdd\u6846\u662f\u5426\u6210\u529f\u5c55\u793a\u4ee5\u53ca\u7528\u6237\u540e\u7eed\u64cd\u4f5c\u3002<\/p>\n<\/li>\n<p>\u6d41\u7a0b\u793a\u610f\u5982\u4e0b&#xff1a;<\/p>\n<p>\u5e94\u7528 -&gt; checkAppUpdate -&gt; \u5347\u7ea7\u670d\u52a1API<br \/>\n\u5e94\u7528 &lt;- \u8fd4\u56de\u662f\u5426\u6709\u65b0\u7248\u672c &lt;- \u5347\u7ea7\u670d\u52a1API<br \/>\n\u5e94\u7528 -&gt; showUpdateDialog -&gt; \u5347\u7ea7\u670d\u52a1API<br \/>\n\u5e94\u7528 &lt;- \u8fd4\u56de\u663e\u793a\u7ed3\u679c &lt;- \u5347\u7ea7\u670d\u52a1API<\/p>\n<p>\u8be5\u6d41\u7a0b\u6e05\u6670\u7b80\u6d01&#xff0c;\u5f00\u53d1\u8005\u53ea\u9700\u5173\u6ce8\u63a5\u53e3\u8c03\u7528\u548c\u7ed3\u679c\u5904\u7406\u5373\u53ef&#xff0c;\u65e0\u9700\u6df1\u5165\u7406\u89e3\u5347\u7ea7\u670d\u52a1\u5185\u90e8\u5b9e\u73b0\u3002<\/p>\n<h2>\u7ea6\u675f\u4e0e\u9650\u5236<\/h2>\n<p>\u5728\u4f7f\u7528\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u524d&#xff0c;\u5f00\u53d1\u8005\u9700\u8981\u5145\u5206\u4e86\u89e3\u4ee5\u4e0b\u7ea6\u675f\u4e0e\u9650\u5236&#xff0c;\u4ee5\u786e\u4fdd\u529f\u80fd\u80fd\u591f\u6b63\u5e38\u9002\u914d\u5e76\u7a33\u5b9a\u8fd0\u884c\u3002<\/p>\n<h3>\u8bbe\u5907\u652f\u6301<\/h3>\n<table>\n<tr>\u8bbe\u5907\u7c7b\u578b\u652f\u6301\u60c5\u51b5\u5907\u6ce8<\/tr>\n<tbody>\n<tr>\n<td>Phone<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u4ece\u521d\u59cb\u7248\u672c\u8d77\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>Tablet<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u4ece\u521d\u59cb\u7248\u672c\u8d77\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>PC \/ 2in1<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u4ece\u521d\u59cb\u7248\u672c\u8d77\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>TV<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u4ece 5.1.1(19) \u7248\u672c\u5f00\u59cb\u65b0\u589e\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td>Wearable<\/td>\n<td>\u652f\u6301<\/td>\n<td>\u4ece 6.0.0(20) \u7248\u672c\u5f00\u59cb\u65b0\u589e\u652f\u6301<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5f00\u53d1\u8005\u9700\u8981\u6839\u636e\u5e94\u7528\u7684\u76ee\u6807\u8bbe\u5907\u7c7b\u578b\u786e\u8ba4\u6240\u4f7f\u7528\u7684 API \u7248\u672c\u662f\u5426\u6ee1\u8db3\u8981\u6c42\u3002\u5bf9\u4e8e TV \u548c Wearable \u8bbe\u5907&#xff0c;\u9700\u8981\u786e\u4fdd\u8fd0\u884c\u73af\u5883\u7248\u672c\u4e0d\u4f4e\u4e8e\u4e0a\u8ff0\u6307\u5b9a\u7248\u672c\u3002\u5982\u679c\u5e94\u7528\u9700\u8981\u540c\u65f6\u8986\u76d6\u591a\u79cd\u8bbe\u5907\u7c7b\u578b&#xff0c;\u5efa\u8bae\u5728\u4ee3\u7801\u4e2d\u8fdb\u884c\u8bbe\u5907\u7c7b\u578b\u5224\u65ad\u6216\u7248\u672c\u5224\u65ad&#xff0c;\u907f\u514d\u5728\u4e0d\u652f\u6301\u7684\u8bbe\u5907\u4e0a\u8c03\u7528\u63a5\u53e3\u5bfc\u81f4\u5f02\u5e38\u3002<\/p>\n<h3>\u8c03\u8bd5\u73af\u5883\u9650\u5236<\/h3>\n<p>\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd \u4e0d\u652f\u6301\u6a21\u62df\u5668\u3002\u5728\u6a21\u62df\u5668\u4e2d\u4f7f\u7528\u8be5\u670d\u52a1\u65f6&#xff0c;\u7cfb\u7edf\u4f1a\u63d0\u793a&#xff1a;<\/p>\n<p>\u65e0\u6cd5\u83b7\u53d6\u5185\u5bb9&#xff0c;\u8bf7\u70b9\u51fb\u5c4f\u5e55\u91cd\u8bd5\u3002<\/p>\n<p>\u56e0\u6b64&#xff0c;\u5f00\u53d1\u8005\u5fc5\u987b\u4f7f\u7528 \u771f\u673a \u8fdb\u884c\u8c03\u8bd5\u548c\u9a8c\u8bc1\u3002\u5efa\u8bae\u51c6\u5907\u81f3\u5c11\u4e00\u53f0\u7b26\u5408\u76ee\u6807\u8bbe\u5907\u7c7b\u578b\u7684\u771f\u673a&#xff0c;\u5e76\u786e\u4fdd\u771f\u673a\u7cfb\u7edf\u7248\u672c\u6ee1\u8db3\u8981\u6c42\u3002<\/p>\n<h3>\u5e94\u7528\u4e0a\u67b6\u8981\u6c42<\/h3>\n<p>\u5e94\u7528\u5fc5\u987b \u5df2\u5728\u5e94\u7528\u5e02\u573a\u4e0a\u67b6&#xff0c;\u624d\u80fd\u6b63\u5e38\u4f7f\u7528\u8be5\u529f\u80fd\u3002\u672a\u4e0a\u67b6\u7684\u5e94\u7528\u65e0\u6cd5\u901a\u8fc7\u8be5\u670d\u52a1\u83b7\u53d6\u7248\u672c\u66f4\u65b0\u4fe1\u606f\u3002\u5982\u679c\u5e94\u7528\u5c1a\u5904\u4e8e\u5f00\u53d1\u9636\u6bb5\u6216\u672a\u5b8c\u6210\u4e0a\u67b6\u6d41\u7a0b&#xff0c;\u9700\u8981\u5148\u5b8c\u6210\u4e0a\u67b6&#xff0c;\u518d\u8fdb\u884c\u66f4\u65b0\u529f\u80fd\u7684\u8054\u8c03\u4e0e\u9a8c\u8bc1\u3002<\/p>\n<h3>\u7248\u672c\u68c0\u6d4b\u6761\u4ef6<\/h3>\n<ul>\n<li>\u672c\u5730\u5b89\u88c5\u7248\u672c\u5fc5\u987b \u4f4e\u4e8e \u5e94\u7528\u5e02\u573a\u5728\u67b6\u7248\u672c&#xff0c;\u624d\u80fd\u68c0\u67e5\u5230\u66f4\u65b0\u3002\u5982\u679c\u672c\u5730\u7248\u672c\u7b49\u4e8e\u6216\u9ad8\u4e8e\u5728\u67b6\u7248\u672c&#xff0c;\u5219\u4e0d\u4f1a\u68c0\u6d4b\u5230\u66f4\u65b0\u3002<\/li>\n<li>\u672c\u5730\u5b89\u88c5\u7248\u672c\u5fc5\u987b\u4e0e\u5e94\u7528\u5e02\u573a\u5728\u67b6\u7248\u672c\u7684 \u7b7e\u540d\u4fe1\u606f\u4fdd\u6301\u4e00\u81f4&#xff0c;\u5426\u5219\u65e0\u6cd5\u6b63\u5e38\u68c0\u6d4b\u3002<\/li>\n<li>\u6682\u4e0d\u652f\u6301 \u9080\u8bf7\u6d4b\u8bd5 \u548c \u516c\u5f00\u6d4b\u8bd5 \u73af\u5883\u4e0b\u7684\u7248\u672c\u68c0\u6d4b\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u6761\u4ef6\u786e\u4fdd\u4e86\u66f4\u65b0\u68c0\u6d4b\u7684\u51c6\u786e\u6027\u548c\u5b89\u5168\u6027&#xff0c;\u907f\u514d\u56e0\u7b7e\u540d\u4e0d\u4e00\u81f4\u6216\u6d4b\u8bd5\u73af\u5883\u5e72\u6270\u5bfc\u81f4\u8bef\u5224\u3002<\/p>\n<h2>\u63a5\u53e3\u8bf4\u660e<\/h2>\n<p>\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u63d0\u4f9b\u4e24\u4e2a\u4e3b\u8981\u63a5\u53e3&#xff0c;\u5177\u4f53\u5982\u4e0b&#xff1a;<\/p>\n<table>\n<tr>\u63a5\u53e3\u540d\u63cf\u8ff0<\/tr>\n<tbody>\n<tr>\n<td>checkAppUpdate(context: common.UIAbilityContext): Promise&lt;CheckUpdateResult&gt;<\/td>\n<td>\u68c0\u67e5\u66f4\u65b0\u63a5\u53e3&#xff0c;\u7528\u4e8e\u68c0\u6d4b\u5f53\u524d\u662f\u5426\u6709\u65b0\u7248\u672c\u3002<\/td>\n<\/tr>\n<tr>\n<td>showUpdateDialog(context: common.UIAbilityContext): Promise&lt;ShowUpdateResultCode&gt;<\/td>\n<td>\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u63a5\u53e3&#xff0c;\u7528\u4e8e\u63d0\u793a\u7528\u6237\u8fdb\u884c\u5347\u7ea7\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e24\u4e2a\u63a5\u53e3\u5747\u63a5\u6536\u4e00\u4e2a common.UIAbilityContext \u7c7b\u578b\u7684\u4e0a\u4e0b\u6587\u53c2\u6570&#xff0c;\u5e76\u8fd4\u56de\u4e00\u4e2a Promise \u5bf9\u8c61&#xff0c;\u4fbf\u4e8e\u5f00\u53d1\u8005\u4f7f\u7528\u5f02\u6b65\u65b9\u5f0f\u5904\u7406\u7ed3\u679c\u3002<\/p>\n<h3>checkAppUpdate \u63a5\u53e3<\/h3>\n<ul>\n<li>\u5165\u53c2&#xff1a;context&#xff0c;\u7c7b\u578b\u4e3a common.UIAbilityContext&#xff0c;\u8868\u793a\u5f53\u524d UIAbility \u7684\u4e0a\u4e0b\u6587\u3002\u5f00\u53d1\u8005\u9700\u8981\u901a\u8fc7 getUIContext().getHostContext() \u7b49\u65b9\u5f0f\u83b7\u53d6\u6709\u6548\u7684\u4e0a\u4e0b\u6587\u5bf9\u8c61\u3002<\/li>\n<li>\u8fd4\u56de\u503c&#xff1a;Promise&lt;CheckUpdateResult&gt;&#xff0c;\u5f02\u6b65\u8fd4\u56de\u68c0\u67e5\u7ed3\u679c\u5bf9\u8c61\u3002<\/li>\n<li>\u7ed3\u679c\u8bf4\u660e&#xff1a;CheckUpdateResult \u4e2d\u5305\u542b updateAvailable \u7b49\u5c5e\u6027\u3002\u5f53 updateAvailable \u4e3a true \u65f6&#xff0c;\u8868\u793a\u5b58\u5728\u53ef\u66f4\u65b0\u7248\u672c&#xff1b;\u4e3a false \u65f6&#xff0c;\u8868\u793a\u5f53\u524d\u5df2\u662f\u6700\u65b0\u7248\u672c\u6216\u4e0d\u6ee1\u8db3\u68c0\u6d4b\u6761\u4ef6\u3002\u5f00\u53d1\u8005\u53ef\u6839\u636e\u8be5\u5c5e\u6027\u51b3\u5b9a\u662f\u5426\u7ee7\u7eed\u8c03\u7528\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u63a5\u53e3\u3002<\/li>\n<\/ul>\n<p>\u8c03\u7528\u793a\u4f8b\u5df2\u5728\u524d\u6587\u5f00\u53d1\u6b65\u9aa4\u4e2d\u7ed9\u51fa&#xff0c;\u6b64\u5904\u4e0d\u518d\u91cd\u590d\u3002<\/p>\n<h3>showUpdateDialog \u63a5\u53e3<\/h3>\n<ul>\n<li>\u5165\u53c2&#xff1a;context&#xff0c;\u7c7b\u578b\u4e3a common.UIAbilityContext&#xff0c;\u8868\u793a\u5f53\u524d UIAbility \u7684\u4e0a\u4e0b\u6587\u3002\u4e0e checkAppUpdate \u63a5\u53e3\u7684\u5165\u53c2\u8981\u6c42\u4e00\u81f4\u3002<\/li>\n<li>\u8fd4\u56de\u503c&#xff1a;Promise&lt;ShowUpdateResultCode&gt;&#xff0c;\u5f02\u6b65\u8fd4\u56de\u663e\u793a\u7ed3\u679c\u7801\u3002<\/li>\n<li>\u7ed3\u679c\u8bf4\u660e&#xff1a;ShowUpdateResultCode \u8868\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u7684\u663e\u793a\u7ed3\u679c\u3002\u5f00\u53d1\u8005\u53ef\u6839\u636e\u7ed3\u679c\u7801\u5224\u65ad\u5bf9\u8bdd\u6846\u662f\u5426\u6210\u529f\u5c55\u793a\u3001\u7528\u6237\u662f\u5426\u8fdb\u884c\u4e86\u76f8\u5173\u64cd\u4f5c&#xff08;\u5982\u70b9\u51fb\u66f4\u65b0\u3001\u53d6\u6d88\u7b49&#xff09;\u3002\u5177\u4f53\u7ed3\u679c\u7801\u542b\u4e49\u53ef\u53c2\u8003\u63a5\u53e3\u6587\u6863\u3002<\/li>\n<\/ul>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u901a\u5e38\u5e94\u5148\u8c03\u7528 checkAppUpdate \u786e\u8ba4\u5b58\u5728\u65b0\u7248\u672c\u540e&#xff0c;\u518d\u8c03\u7528 showUpdateDialog\u3002\u5982\u679c\u5728\u65e0\u65b0\u7248\u672c\u7684\u60c5\u51b5\u4e0b\u76f4\u63a5\u8c03\u7528&#xff0c;\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5bf9\u8bdd\u6846\u65e0\u6cd5\u5c55\u793a\u6216\u8fd4\u56de\u9519\u8bef\u7ed3\u679c\u3002<\/p>\n<h2>\u9002\u914d\u8fc7\u7a0b<\/h2>\n<p>\u9002\u914d\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u9700\u8981\u4ece\u8bbe\u5907\u3001\u7248\u672c\u3001\u7b7e\u540d\u3001\u8c03\u8bd5\u73af\u5883\u3001\u4e0a\u67b6\u72b6\u6001\u7b49\u591a\u4e2a\u7ef4\u5ea6\u8fdb\u884c\u51c6\u5907\u548c\u9a8c\u8bc1\u3002\u4ee5\u4e0b\u662f\u9002\u914d\u8fc7\u7a0b\u4e2d\u9700\u8981\u6ce8\u610f\u7684\u5173\u952e\u70b9\u3002<\/p>\n<h3>\u8bbe\u5907\u9002\u914d<\/h3>\n<p>\u6839\u636e\u5e94\u7528\u7684\u76ee\u6807\u8bbe\u5907\u7c7b\u578b&#xff0c;\u786e\u8ba4\u8fd0\u884c\u73af\u5883\u7248\u672c\u662f\u5426\u6ee1\u8db3\u8981\u6c42&#xff1a;<\/p>\n<ul>\n<li>\u5982\u679c\u5e94\u7528\u9762\u5411 Phone\u3001Tablet\u3001PC \/ 2in1 \u8bbe\u5907&#xff0c;\u53ef\u76f4\u63a5\u4f7f\u7528\u8be5\u529f\u80fd&#xff0c;\u65e0\u9700\u989d\u5916\u5224\u65ad\u3002<\/li>\n<li>\u5982\u679c\u5e94\u7528\u9762\u5411 TV \u8bbe\u5907&#xff0c;\u9700\u786e\u4fdd\u7cfb\u7edf\u7248\u672c\u4e0d\u4f4e\u4e8e 5.1.1(19)\u3002<\/li>\n<li>\u5982\u679c\u5e94\u7528\u9762\u5411 Wearable \u8bbe\u5907&#xff0c;\u9700\u786e\u4fdd\u7cfb\u7edf\u7248\u672c\u4e0d\u4f4e\u4e8e 6.0.0(20)\u3002<\/li>\n<\/ul>\n<p>\u5728\u96c6\u6210\u524d&#xff0c;\u5efa\u8bae\u5f00\u53d1\u8005\u660e\u786e\u5e94\u7528\u7684\u76ee\u6807\u8bbe\u5907\u8303\u56f4&#xff0c;\u907f\u514d\u5728\u4e0d\u652f\u6301\u7684\u8bbe\u5907\u4e0a\u8c03\u7528\u63a5\u53e3\u5bfc\u81f4\u5f02\u5e38\u3002\u5982\u679c\u5e94\u7528\u9700\u8981\u8986\u76d6\u591a\u79cd\u8bbe\u5907\u7c7b\u578b&#xff0c;\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0\u8bbe\u5907\u7c7b\u578b\u6216\u7cfb\u7edf\u7248\u672c\u5224\u65ad\u903b\u8f91&#xff0c;\u4ec5\u5f53\u6ee1\u8db3\u6761\u4ef6\u65f6\u624d\u8c03\u7528\u66f4\u65b0\u76f8\u5173\u63a5\u53e3\u3002<\/p>\n<h3>\u7248\u672c\u9002\u914d<\/h3>\n<ul>\n<li>\u5e94\u7528\u672c\u5730\u5b89\u88c5\u7248\u672c\u5fc5\u987b\u4f4e\u4e8e\u5e94\u7528\u5e02\u573a\u5728\u67b6\u7248\u672c&#xff0c;\u624d\u80fd\u68c0\u67e5\u5230\u66f4\u65b0\u3002\u56e0\u6b64&#xff0c;\u5728\u5f00\u53d1\u9636\u6bb5\u8fdb\u884c\u771f\u673a\u8c03\u8bd5\u65f6&#xff0c;\u9700\u8981\u786e\u4fdd\u8bbe\u5907\u4e0a\u5b89\u88c5\u7684\u7248\u672c\u4e3a\u65e7\u7248\u672c&#xff0c;\u800c\u5e94\u7528\u5e02\u573a\u5df2\u4e0a\u67b6\u65b0\u7248\u672c\u3002<\/li>\n<li>\u7248\u672c\u53f7\u6bd4\u8f83\u4ee5\u5e94\u7528\u5e02\u573a\u7684\u5728\u67b6\u7248\u672c\u4e3a\u51c6&#xff0c;\u5f00\u53d1\u8005\u65e0\u9700\u81ea\u884c\u5b9e\u73b0\u7248\u672c\u6bd4\u8f83\u903b\u8f91\u3002\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u4f1a\u6839\u636e\u5305\u540d\u548c\u7b7e\u540d\u4fe1\u606f\u81ea\u52a8\u5339\u914d\u5728\u67b6\u7248\u672c&#xff0c;\u5e76\u6bd4\u8f83\u7248\u672c\u53f7\u9ad8\u4f4e\u3002<\/li>\n<\/ul>\n<h3>\u7b7e\u540d\u4e00\u81f4\u6027\u9002\u914d<\/h3>\n<p>\u672c\u5730\u5b89\u88c5\u7248\u672c\u4e0e\u5e94\u7528\u5e02\u573a\u5728\u67b6\u7248\u672c\u5fc5\u987b\u4f7f\u7528 \u76f8\u540c\u7684\u7b7e\u540d\u4fe1\u606f\u3002\u5982\u679c\u7b7e\u540d\u4e0d\u4e00\u81f4&#xff0c;\u5373\u4f7f\u7248\u672c\u53f7\u8f83\u4f4e&#xff0c;\u4e5f\u65e0\u6cd5\u6b63\u5e38\u68c0\u6d4b\u5230\u66f4\u65b0\u3002\u56e0\u6b64&#xff0c;\u5728\u8c03\u8bd5\u524d\u9700\u786e\u8ba4&#xff1a;<\/p>\n<ul>\n<li>\u771f\u673a\u4e0a\u5b89\u88c5\u7684\u5305\u4e0e\u5df2\u4e0a\u67b6\u5305\u4f7f\u7528\u76f8\u540c\u7684\u7b7e\u540d\u8bc1\u4e66\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528\u8c03\u8bd5\u7b7e\u540d\u6216\u7b2c\u4e09\u65b9\u7b7e\u540d&#xff0c;\u53ef\u80fd\u5bfc\u81f4\u68c0\u6d4b\u5931\u8d25\u3002<\/li>\n<\/ul>\n<p>\u5efa\u8bae\u5728\u9002\u914d\u9636\u6bb5\u4f7f\u7528\u4e0e\u6b63\u5f0f\u53d1\u5e03\u5b8c\u5168\u4e00\u81f4\u7684\u7b7e\u540d\u914d\u7f6e&#xff0c;\u907f\u514d\u56e0\u7b7e\u540d\u5dee\u5f02\u5f15\u8d77\u4e0d\u5fc5\u8981\u7684\u8c03\u8bd5\u56f0\u96be\u3002<\/p>\n<h3>\u8c03\u8bd5\u73af\u5883\u9002\u914d<\/h3>\n<p>\u7531\u4e8e\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u4e0d\u652f\u6301\u6a21\u62df\u5668&#xff0c;\u5f00\u53d1\u8005\u5728\u9002\u914d\u8fc7\u7a0b\u4e2d\u5fc5\u987b\u4f7f\u7528\u771f\u673a\u8fdb\u884c\u8c03\u8bd5\u3002\u5efa\u8bae\u51c6\u5907\u4e00\u53f0\u6216\u591a\u53f0\u7b26\u5408\u76ee\u6807\u8bbe\u5907\u7c7b\u578b\u7684\u771f\u673a&#xff0c;\u5e76\u786e\u4fdd\u771f\u673a\u5df2\u8fde\u63a5\u7f51\u7edc\u3001\u5df2\u767b\u5f55\u534e\u4e3a\u8d26\u53f7&#xff08;\u5982\u9700\u8981&#xff09;\u4e14\u7cfb\u7edf\u7248\u672c\u6ee1\u8db3\u8981\u6c42\u3002<\/p>\n<p>\u6b64\u5916&#xff0c;\u771f\u673a\u4e0a\u5b89\u88c5\u7684\u5e94\u7528\u7248\u672c\u5e94\u4f4e\u4e8e\u5728\u67b6\u7248\u672c&#xff0c;\u4e14\u7b7e\u540d\u4e0e\u5728\u67b6\u7248\u672c\u4e00\u81f4&#xff0c;\u8fd9\u6837\u624d\u80fd\u5b8c\u6574\u9a8c\u8bc1\u68c0\u67e5\u66f4\u65b0\u548c\u663e\u793a\u5bf9\u8bdd\u6846\u7684\u5168\u6d41\u7a0b\u3002<\/p>\n<h3>\u4e0a\u67b6\u72b6\u6001\u9002\u914d<\/h3>\n<p>\u5e94\u7528\u5fc5\u987b\u5df2\u5728\u5e94\u7528\u5e02\u573a\u4e0a\u67b6\u3002\u5982\u679c\u662f\u65b0\u5efa\u5e94\u7528\u6216\u5c1a\u672a\u4e0a\u67b6&#xff0c;\u9700\u8981\u5148\u5b8c\u6210\u4e0a\u67b6\u6d41\u7a0b&#xff0c;\u518d\u8fdb\u884c\u66f4\u65b0\u529f\u80fd\u7684\u8054\u8c03\u4e0e\u9a8c\u8bc1\u3002\u9080\u8bf7\u6d4b\u8bd5\u548c\u516c\u5f00\u6d4b\u8bd5\u73af\u5883\u6682\u4e0d\u652f\u6301\u8be5\u529f\u80fd&#xff0c;\u56e0\u6b64\u6d4b\u8bd5\u65f6\u9700\u4f7f\u7528\u6b63\u5f0f\u4e0a\u67b6\u7248\u672c\u4f5c\u4e3a\u201c\u5728\u67b6\u7248\u672c\u201d\u3002<\/p>\n<h2>\u5f00\u53d1\u6b65\u9aa4\u8be6\u89e3<\/h2>\n<p>\u4e0b\u9762\u5206\u522b\u4ecb\u7ecd\u68c0\u6d4b\u5e94\u7528\u65b0\u7248\u672c\u548c\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u7684\u8be6\u7ec6\u5f00\u53d1\u6b65\u9aa4&#xff0c;\u5305\u542b\u5bfc\u5165\u6a21\u5757\u3001\u6784\u9020\u53c2\u6570\u3001\u8c03\u7528\u63a5\u53e3\u548c\u7ed3\u679c\u5904\u7406\u3002<\/p>\n<h3>\u68c0\u6d4b\u5e94\u7528\u65b0\u7248\u672c<\/h3>\n<h4>\u5bfc\u5165\u6a21\u5757<\/h4>\n<p>\u9996\u5148\u5bfc\u5165 updateManager \u6a21\u5757\u53ca\u76f8\u5173\u516c\u5171\u6a21\u5757&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> updateManager <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.AppGalleryKit&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> hilog <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.PerformanceAnalysisKit&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token keyword\">type<\/span> <span class=\"token punctuation\">{<\/span> common <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.AbilityKit&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> BusinessError <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.BasicServicesKit&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u5176\u4e2d&#xff1a;<\/p>\n<ul>\n<li>updateManager \u662f\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u7684\u6838\u5fc3\u6a21\u5757&#xff0c;\u63d0\u4f9b\u4e86 checkAppUpdate \u548c showUpdateDialog \u63a5\u53e3\u3002<\/li>\n<li>hilog \u7528\u4e8e\u65e5\u5fd7\u8f93\u51fa&#xff0c;\u4fbf\u4e8e\u5f00\u53d1\u8005\u8c03\u8bd5\u548c\u8bb0\u5f55\u8fd0\u884c\u72b6\u6001\u3002<\/li>\n<li>common \u7c7b\u578b\u7528\u4e8e\u58f0\u660e UIAbility \u4e0a\u4e0b\u6587\u3002<\/li>\n<li>BusinessError \u7c7b\u578b\u7528\u4e8e\u6355\u83b7\u548c\u5904\u7406\u4e1a\u52a1\u5f02\u5e38\u3002<\/li>\n<\/ul>\n<h4>\u6784\u9020\u53c2\u6570<\/h4>\n<p>checkAppUpdate \u63a5\u53e3\u7684\u5165\u53c2\u4e3a common.UIAbilityContext \u7c7b\u578b\u7684 Context\u3002\u53ef\u4ee5\u901a\u8fc7 UIAbility \u4e0a\u4e0b\u6587\u83b7\u53d6&#xff1a;<\/p>\n<p><span class=\"token keyword\">let<\/span> context<span class=\"token operator\">:<\/span> common<span class=\"token punctuation\">.<\/span>UIAbilityContext <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">getUIContext<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">getHostContext<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> common<span class=\"token punctuation\">.<\/span>UIAbilityContext<span class=\"token punctuation\">;<\/span><\/p>\n<p>\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d&#xff0c;\u8bf7\u786e\u4fdd this \u6307\u5411\u5f53\u524d UIAbility \u5b9e\u4f8b&#xff0c;\u4e14 getUIContext() \u65b9\u6cd5\u53ef\u7528\u3002<\/p>\n<h4>\u8c03\u7528\u63a5\u53e3<\/h4>\n<p>\u8c03\u7528 checkAppUpdate \u65b9\u6cd5\u68c0\u67e5\u5e94\u7528\u7248\u672c\u662f\u5426\u6709\u66f4\u65b0&#xff0c;\u5e76\u5904\u7406\u8fd4\u56de\u7ed3\u679c\u548c\u5f02\u5e38&#xff1a;<\/p>\n<p><span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  updateManager<span class=\"token punctuation\">.<\/span><span class=\"token function\">checkAppUpdate<\/span><span class=\"token punctuation\">(<\/span>context<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token function\">then<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>checkResult<span class=\"token operator\">:<\/span> updateManager<span class=\"token punctuation\">.<\/span>CheckUpdateResult<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      hilog<span class=\"token punctuation\">.<\/span><span class=\"token function\">info<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;TAG&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Succeeded in checking Result updateAvailable:&#039;<\/span> <span class=\"token operator\">&#043;<\/span> checkResult<span class=\"token punctuation\">.<\/span>updateAvailable<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">catch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>error<span class=\"token operator\">:<\/span> BusinessError<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      hilog<span class=\"token punctuation\">.<\/span><span class=\"token function\">error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;TAG&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">checkAppUpdate onError.code is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>code<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">, message is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>message<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">catch<\/span> <span class=\"token punctuation\">(<\/span>error<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  hilog<span class=\"token punctuation\">.<\/span><span class=\"token function\">error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;TAG&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">checkAppUpdate onError.code is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>code<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">, message is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>message<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u4f7f\u7528 try&#8230;catch \u5305\u88f9\u63a5\u53e3\u8c03\u7528&#xff0c;\u5e76\u5728 Promise \u7684 then \u548c catch \u4e2d\u5206\u522b\u5904\u7406\u6210\u529f\u548c\u5931\u8d25\u60c5\u51b5\u3002\u65e5\u5fd7\u4e2d\u8bb0\u5f55\u4e86 updateAvailable \u7684\u503c\u548c\u9519\u8bef\u7801\u3001\u9519\u8bef\u4fe1\u606f&#xff0c;\u4fbf\u4e8e\u6392\u67e5\u95ee\u9898\u3002<\/p>\n<h4>\u7ed3\u679c\u5904\u7406<\/h4>\n<ul>\n<li>\u5f53 checkResult.updateAvailable \u4e3a true \u65f6&#xff0c;\u8868\u793a\u5b58\u5728\u53ef\u66f4\u65b0\u7248\u672c&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u4e1a\u52a1\u9700\u8981\u51b3\u5b9a\u662f\u5426\u5f39\u51fa\u5347\u7ea7\u5bf9\u8bdd\u6846\u3002<\/li>\n<li>\u5f53 checkResult.updateAvailable \u4e3a false \u65f6&#xff0c;\u8868\u793a\u5f53\u524d\u5df2\u662f\u6700\u65b0\u7248\u672c&#xff0c;\u65e0\u9700\u8fdb\u4e00\u6b65\u64cd\u4f5c\u3002<\/li>\n<li>\u5728 catch \u4e2d\u6355\u83b7 BusinessError \u5f02\u5e38&#xff0c;\u8bb0\u5f55\u9519\u8bef\u7801\u548c\u9519\u8bef\u4fe1\u606f&#xff0c;\u4fbf\u4e8e\u5b9a\u4f4d\u95ee\u9898\u539f\u56e0\u3002<\/li>\n<\/ul>\n<h3>\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846<\/h3>\n<h4>\u5bfc\u5165\u6a21\u5757<\/h4>\n<p>\u4e0e\u68c0\u6d4b\u66f4\u65b0\u76f8\u540c&#xff0c;\u9996\u5148\u5bfc\u5165\u6240\u9700\u6a21\u5757&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> updateManager <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.AppGalleryKit&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> hilog <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.PerformanceAnalysisKit&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token keyword\">type<\/span> <span class=\"token punctuation\">{<\/span> common <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.AbilityKit&#039;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token punctuation\">{<\/span> BusinessError <span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">from<\/span> <span class=\"token string\">&#039;&#064;kit.BasicServicesKit&#039;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4>\u6784\u9020\u53c2\u6570<\/h4>\n<p>showUpdateDialog \u63a5\u53e3\u7684\u5165\u53c2\u540c\u6837\u4e3a common.UIAbilityContext \u7c7b\u578b\u7684 Context&#xff1a;<\/p>\n<p><span class=\"token keyword\">let<\/span> context<span class=\"token operator\">:<\/span> common<span class=\"token punctuation\">.<\/span>UIAbilityContext <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">this<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">getUIContext<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">getHostContext<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> common<span class=\"token punctuation\">.<\/span>UIAbilityContext<span class=\"token punctuation\">;<\/span><\/p>\n<h4>\u8c03\u7528\u63a5\u53e3<\/h4>\n<p>\u8c03\u7528 showUpdateDialog \u65b9\u6cd5\u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846&#xff1a;<\/p>\n<p><span class=\"token keyword\">try<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  updateManager<span class=\"token punctuation\">.<\/span><span class=\"token function\">showUpdateDialog<\/span><span class=\"token punctuation\">(<\/span>context<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token function\">then<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>resultCode<span class=\"token operator\">:<\/span> updateManager<span class=\"token punctuation\">.<\/span>ShowUpdateResultCode<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      hilog<span class=\"token punctuation\">.<\/span><span class=\"token function\">info<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;TAG&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;Succeeded in showing UpdateDialog resultCode:&#039;<\/span> <span class=\"token operator\">&#043;<\/span> resultCode<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">.<\/span><span class=\"token function\">catch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span>error<span class=\"token operator\">:<\/span> BusinessError<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&gt;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      hilog<span class=\"token punctuation\">.<\/span><span class=\"token function\">error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;TAG&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">showUpdateDialog onError.code is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>code<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">, message is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>message<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">catch<\/span> <span class=\"token punctuation\">(<\/span>error<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n  hilog<span class=\"token punctuation\">.<\/span><span class=\"token function\">error<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;TAG&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token template-string\"><span class=\"token template-punctuation string\">&#096;<\/span><span class=\"token string\">showUpdateDialog onError.code is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>code<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token string\">, message is <\/span><span class=\"token interpolation\"><span class=\"token interpolation-punctuation punctuation\">${<\/span>error<span class=\"token punctuation\">.<\/span>message<span class=\"token interpolation-punctuation punctuation\">}<\/span><\/span><span class=\"token template-punctuation string\">&#096;<\/span><\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u540c\u6837\u4f7f\u7528 try&#8230;catch \u548c Promise \u94fe\u5904\u7406\u6210\u529f\u4e0e\u5931\u8d25\u60c5\u51b5\u3002<\/p>\n<h4>\u7ed3\u679c\u5904\u7406<\/h4>\n<ul>\n<li>\u6210\u529f\u65f6&#xff0c;resultCode \u4e3a ShowUpdateResultCode \u7c7b\u578b&#xff0c;\u8868\u793a\u5bf9\u8bdd\u6846\u5c55\u793a\u7ed3\u679c\u3002\u5f00\u53d1\u8005\u53ef\u6839\u636e\u5177\u4f53\u4e1a\u52a1\u903b\u8f91\u8bb0\u5f55\u65e5\u5fd7\u6216\u6267\u884c\u540e\u7eed\u64cd\u4f5c&#xff0c;\u4f8b\u5982\u7edf\u8ba1\u66f4\u65b0\u63d0\u793a\u7684\u5c55\u793a\u6b21\u6570\u3001\u7528\u6237\u70b9\u51fb\u66f4\u65b0\u540e\u7684\u8df3\u8f6c\u884c\u4e3a\u7b49\u3002<\/li>\n<li>\u5931\u8d25\u65f6&#xff0c;\u5728 catch \u4e2d\u6355\u83b7 BusinessError \u5f02\u5e38&#xff0c;\u8bb0\u5f55\u9519\u8bef\u7801\u548c\u9519\u8bef\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<h2>\u6ce8\u610f\u4e8b\u9879<\/h2>\n<li>\n<p>\u8c03\u7528\u987a\u5e8f<br \/>\n\u901a\u5e38\u5148\u8c03\u7528 checkAppUpdate \u68c0\u67e5\u662f\u5426\u6709\u65b0\u7248\u672c&#xff0c;\u53ea\u6709\u786e\u8ba4\u5b58\u5728\u65b0\u7248\u672c\u540e\u518d\u8c03\u7528 showUpdateDialog \u663e\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846\u3002\u907f\u514d\u5728\u65e0\u65b0\u7248\u672c\u65f6\u76f4\u63a5\u5f39\u51fa\u5bf9\u8bdd\u6846\u5bfc\u81f4\u7528\u6237\u4f53\u9a8c\u4e0d\u4f73\u6216\u63a5\u53e3\u8fd4\u56de\u5f02\u5e38\u3002<\/p>\n<\/li>\n<li>\n<p>Context \u6709\u6548\u6027<br \/>\n\u4f20\u5165\u7684 context \u5fc5\u987b\u662f\u6709\u6548\u7684 common.UIAbilityContext&#xff0c;\u5426\u5219\u63a5\u53e3\u53ef\u80fd\u629b\u51fa\u5f02\u5e38\u6216\u8fd4\u56de\u9519\u8bef\u3002\u5efa\u8bae\u5728\u8c03\u7528\u524d\u5bf9 context \u8fdb\u884c\u975e\u7a7a\u5224\u65ad\u3002<\/p>\n<\/li>\n<li>\n<p>\u771f\u673a\u8c03\u8bd5<br \/>\n\u52a1\u5fc5\u4f7f\u7528\u771f\u673a\u8fdb\u884c\u8c03\u8bd5&#xff0c;\u4e0d\u8981\u5728\u6a21\u62df\u5668\u4e0a\u6d4b\u8bd5\u8be5\u529f\u80fd&#xff0c;\u4ee5\u514d\u51fa\u73b0\u201c\u65e0\u6cd5\u83b7\u53d6\u5185\u5bb9&#xff0c;\u8bf7\u70b9\u51fb\u5c4f\u5e55\u91cd\u8bd5\u201d\u7684\u63d0\u793a\u3002\u540c\u65f6\u786e\u4fdd\u771f\u673a\u7cfb\u7edf\u7248\u672c\u6ee1\u8db3\u8bbe\u5907\u652f\u6301\u8981\u6c42\u3002<\/p>\n<\/li>\n<li>\n<p>\u7b7e\u540d\u4e00\u81f4\u6027<br \/>\n\u786e\u4fdd\u672c\u5730\u5b89\u88c5\u7248\u672c\u4e0e\u5e94\u7528\u5e02\u573a\u5728\u67b6\u7248\u672c\u7b7e\u540d\u4e00\u81f4&#xff0c;\u5426\u5219\u65e0\u6cd5\u6b63\u5e38\u68c0\u6d4b\u5230\u66f4\u65b0\u3002\u5728\u5f00\u53d1\u3001\u6d4b\u8bd5\u548c\u53d1\u5e03\u9636\u6bb5\u5c3d\u91cf\u4f7f\u7528\u7edf\u4e00\u7684\u7b7e\u540d\u914d\u7f6e\u3002<\/p>\n<\/li>\n<li>\n<p>\u7248\u672c\u8981\u6c42<br \/>\n\u672c\u5730\u7248\u672c\u5fc5\u987b\u4f4e\u4e8e\u5728\u67b6\u7248\u672c\u624d\u80fd\u89e6\u53d1\u66f4\u65b0\u3002\u82e5\u672c\u5730\u7248\u672c\u7b49\u4e8e\u6216\u9ad8\u4e8e\u5728\u67b6\u7248\u672c&#xff0c;\u5219\u4e0d\u4f1a\u68c0\u6d4b\u5230\u66f4\u65b0\u3002\u56e0\u6b64&#xff0c;\u5728\u8c03\u8bd5\u65f6\u9700\u8981\u523b\u610f\u5b89\u88c5\u65e7\u7248\u672c\u5e94\u7528\u3002<\/p>\n<\/li>\n<li>\n<p>\u6682\u4e0d\u652f\u6301\u6d4b\u8bd5\u73af\u5883<br \/>\n\u9080\u8bf7\u6d4b\u8bd5\u548c\u516c\u5f00\u6d4b\u8bd5\u73af\u5883\u6682\u4e0d\u652f\u6301\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd&#xff0c;\u9700\u5728\u6b63\u5f0f\u4e0a\u67b6\u540e\u9a8c\u8bc1\u3002\u5982\u679c\u5e94\u7528\u6b63\u5728\u53c2\u4e0e\u6d4b\u8bd5&#xff0c;\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u4f7f\u7528\u8be5\u529f\u80fd\u3002<\/p>\n<\/li>\n<li>\n<p>\u7f51\u7edc\u72b6\u6001<br \/>\n\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u4f9d\u8d56\u7f51\u7edc\u901a\u4fe1&#xff0c;\u5982\u679c\u8bbe\u5907\u5904\u4e8e\u65e0\u7f51\u7edc\u6216\u7f51\u7edc\u4e0d\u7a33\u5b9a\u7684\u73af\u5883&#xff0c;\u63a5\u53e3\u53ef\u80fd\u8c03\u7528\u5931\u8d25\u6216\u8fd4\u56de\u9519\u8bef\u3002\u5efa\u8bae\u5728\u4ee3\u7801\u4e2d\u5904\u7406\u7f51\u7edc\u5f02\u5e38\u60c5\u51b5\u3002<\/p>\n<\/li>\n<li>\n<p>\u7528\u6237\u4f53\u9a8c<br \/>\n\u907f\u514d\u8fc7\u4e8e\u9891\u7e41\u5730\u5f39\u51fa\u7248\u672c\u66f4\u65b0\u5bf9\u8bdd\u6846&#xff0c;\u4ee5\u514d\u5e72\u6270\u7528\u6237\u6b63\u5e38\u4f7f\u7528\u3002\u5efa\u8bae\u5728\u5408\u9002\u7684\u65f6\u673a&#xff08;\u5982\u5e94\u7528\u542f\u52a8\u3001\u7528\u6237\u4e3b\u52a8\u89e6\u53d1&#xff09;\u8fdb\u884c\u68c0\u6d4b\u548c\u63d0\u793a\u3002<\/p>\n<\/li>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u7248\u672c\u68c0\u6d4b\u4e0e\u66f4\u65b0\u63d0\u9192\u80fd\u529b&#xff0c;\u901a\u8fc7\u4e24\u4e2a\u7b80\u5355\u63a5\u53e3\u5373\u53ef\u5b8c\u6210\u96c6\u6210\u3002\u9002\u914d\u8fc7\u7a0b\u4e2d\u9700\u91cd\u70b9\u5173\u6ce8\u8bbe\u5907\u652f\u6301\u8303\u56f4\u3001\u7248\u672c\u8981\u6c42\u3001\u7b7e\u540d\u4e00\u81f4\u6027\u3001\u771f\u673a\u8c03\u8bd5\u4ee5\u53ca\u5e94\u7528\u4e0a\u67b6\u72b6\u6001\u7b49\u6761\u4ef6\u3002\u53ea\u6709\u5728\u6ee1\u8db3\u6240\u6709\u7ea6\u675f\u7684\u524d\u63d0\u4e0b&#xff0c;\u5e94\u7528\u624d\u80fd\u6b63\u5e38\u68c0\u6d4b\u5230\u65b0\u7248\u672c\u5e76\u5411\u7528\u6237\u5c55\u793a\u5347\u7ea7\u5bf9\u8bdd\u6846&#xff0c;\u4ece\u800c\u63d0\u5347\u7528\u6237\u7684\u4f7f\u7528\u4f53\u9a8c\u548c\u5e94\u7528\u6d3b\u8dc3\u5ea6\u3002<\/p>\n<p>\u8be5\u529f\u80fd\u7684\u63a5\u5165\u6210\u672c\u4f4e\u3001\u6d41\u7a0b\u6e05\u6670&#xff0c;\u80fd\u591f\u6709\u6548\u5e2e\u52a9\u5f00\u53d1\u8005\u63d0\u9ad8\u65b0\u7248\u672c\u7684\u5206\u53d1\u6548\u7387&#xff0c;\u51cf\u5c11\u56e0\u7248\u672c\u8fc7\u65e7\u5bfc\u81f4\u7684\u7528\u6237\u6d41\u5931\u548c\u517c\u5bb9\u6027\u95ee\u9898\u3002\u5efa\u8bae\u5f00\u53d1\u8005\u5728\u5e94\u7528\u5185\u5408\u7406\u8bbe\u8ba1\u66f4\u65b0\u68c0\u6d4b\u65f6\u673a&#xff0c;\u5145\u5206\u5229\u7528\u8be5\u80fd\u529b\u4e3a\u7528\u6237\u63d0\u4f9b\u53ca\u65f6\u3001\u53cb\u597d\u7684\u5347\u7ea7\u63d0\u9192\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u529f\u80fd\u6982\u8ff0<br \/>\n\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u662f\u534e\u4e3a\u5e94\u7528\u5e02\u573a\u670d\u52a1&#xff08;AppGallery Kit&#xff09;\u9762\u5411\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u4e00\u9879\u5f00\u653e\u80fd\u529b&#xff0c;\u4e3b\u8981\u670d\u52a1\u4e8e\u5df2\u5728\u5e94\u7528\u5e02\u573a\u4e0a\u67b6\u7684\u5e94\u7528\u3002\u8be5\u529f\u80fd\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u5e94\u7528\u5185\u90e8\u96c6\u6210\u7248\u672c\u68c0\u6d4b\u4e0e\u66f4\u65b0\u63d0\u9192\u903b\u8f91&#xff0c;\u5e2e\u52a9\u7528\u6237\u53ca\u65f6\u5c06\u5e94\u7528\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\u3002<br \/>\n\u901a\u8fc7\u8be5\u529f\u80fd&#xff0c;\u5f00\u53d1\u8005\u65e0\u9700\u81ea\u884c\u642d\u5efa\u7248\u672c\u7ba1\u7406\u670d\u52a1\u5668\u3001\u7ef4\u62a4\u7248\u672c\u4fe1\u606f\u3001\u5904\u7406\u4e0b\u8f7d\u8df3\u8f6c\u7b49\u590d\u6742\u903b\u8f91&#xff0c;\u53ea\u9700\u8c03\u7528\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u63d0\u4f9b\u7684\u63a5\u53e3&#xff0c;\u5373\u53ef\u5b8c\u6210\u4ee5\u4e0b\u6838\u5fc3\u64cd\u4f5c&amp;#xff1<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[280,43],"topic":[],"class_list":["post-113994","post","type-post","status-publish","format-standard","hentry","category-server","tag-harmonyos","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/113994.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u529f\u80fd\u6982\u8ff0 \u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u662f\u534e\u4e3a\u5e94\u7528\u5e02\u573a\u670d\u52a1&#xff08;AppGallery Kit&#xff09;\u9762\u5411\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u4e00\u9879\u5f00\u653e\u80fd\u529b&#xff0c;\u4e3b\u8981\u670d\u52a1\u4e8e\u5df2\u5728\u5e94\u7528\u5e02\u573a\u4e0a\u67b6\u7684\u5e94\u7528\u3002\u8be5\u529f\u80fd\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u5e94\u7528\u5185\u90e8\u96c6\u6210\u7248\u672c\u68c0\u6d4b\u4e0e\u66f4\u65b0\u63d0\u9192\u903b\u8f91&#xff0c;\u5e2e\u52a9\u7528\u6237\u53ca\u65f6\u5c06\u5e94\u7528\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\u3002 \u901a\u8fc7\u8be5\u529f\u80fd&#xff0c;\u5f00\u53d1\u8005\u65e0\u9700\u81ea\u884c\u642d\u5efa\u7248\u672c\u7ba1\u7406\u670d\u52a1\u5668\u3001\u7ef4\u62a4\u7248\u672c\u4fe1\u606f\u3001\u5904\u7406\u4e0b\u8f7d\u8df3\u8f6c\u7b49\u590d\u6742\u903b\u8f91&#xff0c;\u53ea\u9700\u8c03\u7528\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u63d0\u4f9b\u7684\u63a5\u53e3&#xff0c;\u5373\u53ef\u5b8c\u6210\u4ee5\u4e0b\u6838\u5fc3\u64cd\u4f5c&amp;#xff1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/113994.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-07T23:49:53+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113994.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/113994.html\",\"name\":\"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-07T23:49:53+00:00\",\"dateModified\":\"2026-10-07T23:49:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/113994.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/113994.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/113994.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/113994.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u529f\u80fd\u6982\u8ff0 \u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u662f\u534e\u4e3a\u5e94\u7528\u5e02\u573a\u670d\u52a1&#xff08;AppGallery Kit&#xff09;\u9762\u5411\u5f00\u53d1\u8005\u63d0\u4f9b\u7684\u4e00\u9879\u5f00\u653e\u80fd\u529b&#xff0c;\u4e3b\u8981\u670d\u52a1\u4e8e\u5df2\u5728\u5e94\u7528\u5e02\u573a\u4e0a\u67b6\u7684\u5e94\u7528\u3002\u8be5\u529f\u80fd\u5141\u8bb8\u5f00\u53d1\u8005\u5728\u5e94\u7528\u5185\u90e8\u96c6\u6210\u7248\u672c\u68c0\u6d4b\u4e0e\u66f4\u65b0\u63d0\u9192\u903b\u8f91&#xff0c;\u5e2e\u52a9\u7528\u6237\u53ca\u65f6\u5c06\u5e94\u7528\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\u3002 \u901a\u8fc7\u8be5\u529f\u80fd&#xff0c;\u5f00\u53d1\u8005\u65e0\u9700\u81ea\u884c\u642d\u5efa\u7248\u672c\u7ba1\u7406\u670d\u52a1\u5668\u3001\u7ef4\u62a4\u7248\u672c\u4fe1\u606f\u3001\u5904\u7406\u4e0b\u8f7d\u8df3\u8f6c\u7b49\u590d\u6742\u903b\u8f91&#xff0c;\u53ea\u9700\u8c03\u7528\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u670d\u52a1\u63d0\u4f9b\u7684\u63a5\u53e3&#xff0c;\u5373\u53ef\u5b8c\u6210\u4ee5\u4e0b\u6838\u5fc3\u64cd\u4f5c&amp;#xff1","og_url":"https:\/\/www.wsisp.com\/helps\/113994.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-07T23:49:53+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/113994.html","url":"https:\/\/www.wsisp.com\/helps\/113994.html","name":"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-07T23:49:53+00:00","dateModified":"2026-10-07T23:49:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/113994.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/113994.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/113994.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9e3f\u8499\u7cfb\u7edf\u5e94\u7528\u5e02\u573a\u66f4\u65b0\u529f\u80fd\u8be6\u89e3\u4e0e\u5f00\u53d1\u9002\u914d\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=113994"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/113994\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=113994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=113994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=113994"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=113994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}