{"id":1534,"date":"2023-06-24T12:04:33","date_gmt":"2023-06-24T04:04:33","guid":{"rendered":"https:\/\/www.zhidianwl.com\/zhidian\/?p=1534"},"modified":"2023-06-24T12:04:33","modified_gmt":"2023-06-24T04:04:33","slug":"aab%e8%bd%ac%e6%8d%a2%e4%b8%baapk%e6%98%af%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.com\/zhidian\/2023\/1534\/","title":{"rendered":"aab\u8f6c\u6362\u4e3aapk\u662f\u600e\u4e48\u5b9e\u73b0\u7684\uff1f"},"content":{"rendered":"

aab\u8f6c\u6362\u4e3aapk\uff0c\u662f\u6307\u5c06Google Play\u53d1\u5e03\u7684aab\u683c\u5f0f\u7684\u5e94\u7528\u5305\u8f6c\u6362\u6210apk\u683c\u5f0f\u7684\u5e94\u7528\u5305\uff0c\u4ee5<\/p>\n

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

\u4fbf\u5728\u975eGoogle Play\u6e20\u9053\u6216\u5176\u4ed6\u5e94\u7528\u5546\u5e97\u4e2d\u53d1\u5e03\u548c\u5206\u53d1\u3002\u4e0b\u9762\u6211\u4eec\u6765\u8be6\u7ec6\u4ecb\u7ecdaab\u8f6c\u6362\u4e3aapk\u7684\u539f\u7406\u548c\u6b65\u9aa4\u3002<\/p>\n

1. \u4e86\u89e3aab\u683c\u5f0f<\/p>\n

aab\u683c\u5f0f\u662fGoogle Play\u63a8\u51fa\u7684\u4e00\u79cd\u65b0\u7684\u5e94\u7528\u5305\u683c\u5f0f\uff0c\u5b83\u76f8\u6bd4\u4e8e\u4f20\u7edf\u7684apk\u683c\u5f0f\uff0c\u6709\u66f4\u5c0f\u7684\u5e94\u7528\u5305\u5927\u5c0f\u3001\u66f4\u5feb\u7684\u4e0b\u8f7d\u901f\u5ea6\u3001\u66f4\u597d\u7684\u5e94\u7528\u6027\u80fd\u548c\u66f4\u5b89\u5168\u7684\u5e94\u7528\u53d1\u5e03\u65b9\u5f0f\u7b49\u4f18\u70b9\u3002aab\u683c\u5f0f\u7684\u5e94\u7528\u5305\u662f\u7531\u591a\u4e2a\u6a21\u5757\u7ec4\u6210\u7684\uff0c\u5176\u4e2d\u5305\u62ec\u57fa\u672c\u6a21\u5757\u548c\u52a8\u6001\u7279\u6027\u6a21\u5757\uff0c\u8fd9\u4e9b\u6a21\u5757\u53ef\u4ee5\u6839\u636e\u8bbe\u5907\u7684\u4e0d\u540c\u6761\u4ef6\u8fdb\u884c\u7075\u6d3b\u7684\u5b89\u88c5\u548c\u4e0b\u8f7d\u3002<\/p>\n

2. \u4f7f\u7528Android Studio\u8fdb\u884caab\u8f6c\u6362\u4e3aapk<\/p>\n

Android Studio\u662fGoogle\u5b98\u65b9\u63d0\u4f9b\u7684Android\u5e94\u7528\u5f00\u53d1\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u8fdb\u884caab\u8f6c\u6362\u4e3aapk\u7684\u64cd\u4f5c\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a<\/p>\n

\uff081\uff09\u5728Android Studio\u4e2d\u6253\u5f00\u4f60\u7684\u5e94\u7528\u9879\u76ee\u3002<\/p>\n

\uff082\uff09\u9009\u62e9Build->Generate Signed Bundle\/APK\u3002<\/p>\n

\uff083\uff09\u9009\u62e9APK\uff0c\u5e76\u70b9\u51fbNext\u3002<\/p>\n

\uff084\uff09\u9009\u62e9\u4f60\u7684\u5e94\u7528\u6a21\u5757\uff0c\u5e76\u70b9\u51fbNext\u3002<\/p>\n

\uff085\uff09\u9009\u62e9Release\uff0c\u5e76\u70b9\u51fbNext\u3002<\/p>\n

\uff086\uff09\u586b\u5199\u4f60\u7684\u5bc6\u94a5\u4fe1\u606f\uff0c\u5e76\u70b9\u51fbNext\u3002<\/p>\n

\uff087\uff09\u9009\u62e9\u6216\u521b\u5efa\u8f93\u51fa\u8def\u5f84\uff0c\u5e76\u70b9\u51fbFinish\u3002<\/p>\n

\uff088\uff09\u5728\u8f93\u51fa\u8def\u5f84\u4e2d\u627e\u5230\u751f\u6210\u7684apk\u6587\u4ef6\uff0c\u5373\u53ef\u8fdb\u884c\u53d1\u5e03\u548c\u5206\u53d1\u3002<\/p>\n

3. \u4f7f\u7528\u547d\u4ee4\u884c\u8fdb\u884caab\u8f6c\u6362\u4e3aapk<\/p>\n

\u5982\u679c\u4f60\u4e0d\u60f3\u4f7f\u7528Android Studio\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u8fdb\u884caab\u8f6c\u6362\u4e3aapk\u7684\u64cd\u4f5c\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a<\/p>\n

\uff081\uff09\u4e0b\u8f7dAndroid SDK Build Tools 28.0.3\u53ca\u4ee5\u4e0a\u7248\u672c\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n

\uff082\uff09\u4f7f\u7528\u547d\u4ee4\u884c\u8fdb\u5165\u5230\u5e94\u7528\u9879\u76ee\u7684\u6839\u76ee\u5f55\u3002<\/p>\n

\uff083\uff09\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

.\/gradlew bundleRelease<\/p>\n

“`<\/p>\n

\uff084\uff09\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

buexe\u6253\u5305<\/a>ndletool build-apks –bundle=app\/build\/outputs\/bundle\/release\/app.aab –output=app\/build\/outputs\/apk\/release\/app.apks –ks=your.keystore –ks-key-alias=your_alias –ks-pass=pass:your_password –key-pass=pass:your_password<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0c–bundle\u53c2\u6570\u4e3a\u5e94\u7528\u7684aab\u6587\u4ef6\u8def\u5f84\uff0c–output\u53c2\u6570\u4e3a\u751f\u6210apk\u6587\u4ef6\u7684\u8def\u5f84\uff0c–ks\u53c2\u6570\u4e3a\u4f60\u7684\u5bc6\u94a5\u6587\u4ef6\u8def\u5f84\uff0c–ks-key-alias\u53c2\u6570\u4e3a\u5bc6\u94a5\u522b\u540d\uff0c–ks-pass\u548c–key-pass\u53c2\u6570\u4e3a\u5bc6\u94a5\u5bc6\u7801\u3002<\/p>\n

\uff085\uff09\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06apk\u6587\u4ef6\u63d0\u53d6\u51fa\u6765\uff1a<\/p>\n

“`<\/p>\n

bundletool extract-apks –apks=app\/build\/outputs\/apk\/release\/app.apks –output-dir=app\/build\/outputs\/apk\/release\/ –device-spec=your_device.json<\/p>\n

“`<\/p>\n

\u5176\u4e91\u63a7app\u5f00\u53d1<\/a>\u4e2d\uff0c–apks\u53c2\u6570\u4e3a\u751f\u6210\u7684apks\u6587\u4ef6\u8def\u5f84\uff0c–output-dir\u53c2\u6570\u4e3a\u63d0\u53d6\u51faapk\u6587\u4ef6\u7684\u8def\u5f84\uff0c–device-spec\u53c2\u6570\u4e3a\u8bbe\u5907\u89c4\u683c\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n

4. \u603b\u7ed3<\/p>\n

aab\u8f6c\u6362\u4e3aapk\u662f\u4e00\u9879\u975e\u5e38\u91cd\u8981\u7684\u64cd\u4f5c\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5728\u975eGoogle Play\u6e20\u9053\u6216\u5176\u4ed6\u5e94\u7528\u5546\u5e97\u4e2d\u53d1\u5e03\u548c\u5206\u53d1\u5e94\u7528\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Android Studio\u6216\u547d\u4ee4\u884c\u8fdb\u884caab\u8f6c\u6362\u4e3aapk\u7684\u64cd\u4f5c\uff0c\u5177\u4f53\u6b65\u9aa4\u53ef\u4ee5\u53c2\u8003\u4e0a\u8ff0\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

aab\u8f6c\u6362\u4e3aapk\uff0c\u662f\u6307\u5c06Google Play\u53d1\u5e03\u7684aab\u683c\u5f0f\u7684\u5e94\u7528\u5305\u8f6c\u6362\u6210apk\u683c\u5f0f\u7684\u5e94\u7528\u5305\uff0c\u4ee5\u4fbf\u5728\u975eGoogle Play\u6e20\u9053\u6216\u5176\u4ed6\u5e94\u7528\u5546\u5e97\u4e2d\u53d1\u5e03\u548c\u5206\u53d1\u3002\u4e0b\u9762\u6211\u4eec\u6765\u8be6\u7ec6\u4ecb\u7ecdaab\u8f6c\u6362\u4e3aapk\u7684<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3303,3304,1657,1822,261],"class_list":["post-1534","post","type-post","status-publish","format-standard","hentry","category-zuoapp","tag-ios","tag-opmlapk","tag-1657","tag-1822","tag-261"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/1534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}