<\/figure>\n<\/p>\nAPK\u8f6c\u6362\u4e3aAAB\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aAPK\u7b7e\u540d\u6587\u4ef6\u3002\u8fd9\u4e2a\u7b7e\u540d\u6587\u4ef6\u5c06\u7528\u4e8e\u751f\u6210AAB\u3002\u5982\u679c\u60a8\u5df2\u7ecf\u6709\u4e00\u4e2a\u7b7e\u540d\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u8df3\u8fc7\u6b64\u6b65\u9aa4\u3002\u5426\u5219\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u7b7e\u540d\u6587\u4ef6\uff1a<\/p>\n
“`<\/p>\n
keytool -genkeypair -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000 -keystore my-release-key.jks<\/p>\n
“`<\/p>\n
\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cmy-release-key.jks\u201d\u7684\u7b7e\u540d\u6587\u4ef6\u3002\u60a8\u9700\u8981\u8bb0\u5f55\u4e0b\u522b\u540d\u3001\u5bc6\u7801\u548c\u5bc6\u94a5\u5e93\u6587\u4ef6\u7684\u8def\u5f84\u3002\u8fd9\u4e9b\u4fe1\u606f\u5c06\u5728\u4e0b\u4e00\u6b65\u4e2d\u4f7f\u7528\u3002<\/p>\n
3. \u5c06APK\u8f6c\u6362\u4e3aAAB<\/p>\n
\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528bundletool\u5de5\u5177\u5c06APK\u8f6c\u6362\u4e3aAAB\u3002\u5728\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n
“`<\/p>\n
java -jar bundletool.jar build-apks –bundle=\/path\/to\/your\/app-bundle.aab –output=\/path\/to\/output.apks –ks=\/path\/to\/your\/keystore.jks –ks-key-alias=my-key-alias –ks-pass=file:\/path\/to\/your\/keystore.pwd –key-pass=file:\/path\/to\/your\/key.pwd<\/p>\n
“`<\/p>\n
\u5728\u4e0a\u9762\u7684\u547d\u4ee4\u4e2d\uff0c\u60a8\u9700\u8981\u5c06\u201c\/path\/to\/your\/app-bundle.aab\u201d\u66ff\u6362\u4e3a\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u8def\u5f84\u3002\u60a8\u8fd8\u9700\u8981\u5c06\u201c\/path\/to\/output.apks\u201d\u66ff\u6362\u4e3a\u60a8\u8981\u751f\u6210\u7684AAB\u6587\u4ef6\u7684\u8def\u5f84\u3002\u6700\u540e\uff0c\u60a8\u9700\u8981\u5c06\u201c\/path\/to\/your\/keystore.jks\u201d\u3001\u201cmy-key-alias\u201d\u3001\u201c\/path\/to\/your\/keystore.pwd\u201d\u548c\u201c\/path\/to\/your\/key.pwd\u201d\u66ff\u6362\u4e3a\u60a8\u7684\u7b7e\u540d\u6587\u4ef6\u8def\u5f84\u3001\u522b\u540d\u3001\u5bc6\u94a5\u5e93\u5bc6\u7801\u548c\u5bc6\u94a5\u5bc6\u7801\u3002<\/p>\n
4. \u5b89\u88c5AAB\u6587\u4ef6<\/p>\n
\u73b0\u5728\uff0c\u6211\u4eec\u5df2\u7ecf\u6210\u529f\u5730\u5c06APK\u8f6c\u6362\u4e3aAAB\u3002\u60a8\u53ef\u4ee5\u5c06AAB\u6587\u4ef6\u4e0a\u4f20\u5230Google Play Store\uff0c\u4ee5\u4fbf\u7528\u6237\u4e0b\u8f7d\u548c\u5b89\u88c5\u3002\u5f53\u7528\u6237\u4e0b\u8f7d\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u7cfb\u7edf\u5c06\u6839\u636e\u7528\u6237\u8bbe\u5907\u7684\u914d\u7f6e\u81ea\u52a8\u6784\u5efa\u6700\u4f18\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u3002<\/p>\n
\u603b\u7ed3<\/p>\n
\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4e86\u89e3\u4e86AAB\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u5e76\u5b66\u4e60\u4e86\u5982\u4f55\u5c06APK\u8f6c\u6362\u4e3aAAB\u3002\u901a\u8fc7\u5c06\u5e94\u7528\u7a0b\u5e8f\u8f6c\u6362\u4e3aAAB\uff0c\u6211\u4eec\u53ef\u4ee5\u4e3a\u7528\u6237\u63d0\u4f9b\u66f4\u597d\u7684\u5e94\u7528\u7a0b\u5e8f\u4f53\u9a8c\uff0c\u540c\u65f6\u51cf\u5c11\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u5927\u5c0f\u548c\u5b89\u88c5\u65f6\u95f4\u3002\u5982\u679c\u60a8\u662f\u4e00\u540dAndroid\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u4eba\u5458\uff0c\u90a3\u4e48\u60a8\u5e94\u8be5\u8003\u8651\u4f7f\u7528AAB\u6765\u5206\u53d1\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
APK\uff08Android Package Kit\uff09\u548cAAB\uff08Android App Bundle\uff09\u90fd\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u88c5\u5305\u683c\u5f0f\u3002\u4ee5\u524d\uff0cAndroid\u5e94\u7528\u7a0b\u5e8f\u53ea\u80fd\u4ee5APK\u7684\u5f62\u5f0f\u53d1\u5e03\u3002\u4f46\u662f\uff0c\u968f\u7740<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2277,2278,14,171,261],"class_list":["post-1019","post","type-post","status-publish","format-standard","hentry","category-zuoapp","tag-ios","tag-obbapk","tag-14","tag-171","tag-261"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/1019","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\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/comments?post=1019"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/1019\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/media?parent=1019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/categories?post=1019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/tags?post=1019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}