{"id":17833,"date":"2024-03-05T09:59:01","date_gmt":"2024-03-05T01:59:01","guid":{"rendered":"https:\/\/www.zhidianwl.net\/zhidianwl\/?p=17833"},"modified":"2024-03-05T09:59:01","modified_gmt":"2024-03-05T01:59:01","slug":"apk-%e8%bd%acaab%e8%a6%81%e6%80%8e%e4%b9%88%e5%81%9a%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.net\/zhidianwl\/2024\/03\/05\/apk-%e8%bd%acaab%e8%a6%81%e6%80%8e%e4%b9%88%e5%81%9a%ef%bc%9f\/","title":{"rendered":"apk \u8f6caab\u8981\u600e\u4e48\u505a\uff1f"},"content":{"rendered":"

APK\u548cAAB\u90fd\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u683c\u5f0f\uff0c\u4f46\u5b83\u4eec\u4e4b\u95f4\u6709\u5f88\u5927\u7684\u533a\u522b\u3002APK\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u4f20\u7edf\u683c\u5f0f\uff0c\u800cAAB\u5219\u662fGoogle Play\u7684\u9996\u9009\u683c\u5f0f\u3002AAB\u6587\u4ef6\u6bd4APK\u6587\u4ef6\u66f4\u5c0f\uff0c\u53ef\u4ee5\u51cf\u5c11\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u5927\u5c0f\uff0c\u5e76\u63d0\u9ad8\u7528\u6237\u7684\u4e0b\u8f7d\u901f\u5ea6\u3002\u6b64\u5916\uff0cAAB\u683c\u5f0f\u8fd8\u53ef\u4ee5\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u66f4\u597d\u7684\u5b89\u5168\u6027\u3002<\/p>\n

\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecdAPK\u8f6cAAB\u7684\u539f\u7406\u548c\u6b65\u9aa4\u3002<\/p>\n

1. \u4ec0\u4e48\u662fAPK\uff1f<\/p>\n

APK\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u6807\u51c6\u683c\u5f0f\u3002\u5b83\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u6587\u4ef6\u548c\u8d44\u6e90\uff0c\u4f8b\u5982\u4ee3\u7801\u3001\u56fe\u50cf\u3001\u58f0\u97f3\u548c\u89c6\u9891\u7b49\u3002APK\u6587\u4ef6\u53ef\u4ee5\u5728Google Play\u5546\u5e97\u4e0a\u53d1\u5e03\u548c\u4e0b\u8f7d\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u6e20\u9053\u8fdb\u884c\u5206\u53d1\u3002<\/p>\n

2. \u4ec0\u4e48\u662fAAB\uff1f<\/p>\n

AAB\uff08Android App Bundle\uff09\u662f\u4e00\u79cd\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f\u53d1\u5e03\u683c\u5f0f\uff0c\u7531Google Play\u5546\u5e97\u63a8\u51fa\u3002\u4e0eAPK\u4e0d\u540c\uff0cAAB\u6587\u4ef6\u4e0d\u5305\u542b\u6240\u6709\u5e94\u7528\u7a0b\u5e8f\u8d44\u6e90\uff0c\u800c\u662f\u5305\u542b\u4e86\u4e00\u4e9b\u57fa\u672c\u8d44\u6e90\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u4ee3\u7801\u3002\u8fd9\u4e9b\u57fa\u672c\u8d44\u6e90\u548c\u4ee3\u7801\u5c06\u6839\u636e\u7528\u6237\u8bbe\u5907\u7684\u914d\u7f6e\u548c\u8bed\u8a00\u8fdb\u884c\u52a8\u6001\u4ea4\u4ed8\u3002<\/p>\n

3. \u4e3a\u4ec0\u4e48\u8981\u5c06APK\u8f6c\u6362\u6210AAB\uff1f<\/p>\n

\u5c06app\u5728\u7ebf\u5f00\u53d1\u5e73\u53f0<\/a>APK\u8f6c\u6362\u6210AAB\u53ef\u4ee5\u4f7f\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u5927\u5c0f\u66f4\u5c0f\uff0c\u4ece\u800c\u63d0\u9ad8\u7528\u6237\u4e0b\u8f7d\u901f\u5ea6\u3002\u6b64\u5916\uff0cAAB\u683c\u5f0f\u8fd8\u53ef\u4ee5\u63d0\u4f9b\u66f4\u597d\u7684\u5b89\u5168\u6027\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u9632\u6b62\u5e94\u7528\u7a0b\u5e8f\u88ab\u52a8\u6001\u4fee\u6539\u3002\u6700\u91cd\u8981\u7684\u662f\uff0cAAB\u683c\u5f0f\u53ef\u4ee5\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u52a8\u6001\u4ea4\u4ed8\u5e94\u7528\u7a0b\u5e8f\u8d44\u6e90\uff0c\u4f7f\u5e94\u7528\u7a0b\u5e8f\u66f4\u52a0\u7a33\u5b9a\u548c\u6d41\u7545\u3002<\/p>\n

4. \u5982\u4f55\u5c06APK\u8f6c\u6362\u6210AAB\uff1f<\/p>\n

\u5c06APK\u8f6c\u6362\u6210AAB\u9700\u8981\u4f7f\u7528Google\u63d0\u4f9b\u7684\u5de5\u5177\uff0c\u79f0\u4e3a\u201cbundletool\u201d\u3002Bundletool\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06APK\u8f6c\u6362\u6210AAB\uff0c\u5e76\u5c06AAB\u6587\u4ef6\u4e0a\u4f20\u5230Google Play\u5546\u5e97\u3002<\/p>\n

\u4ee5\u4e0b\u662f\u5c06APK\u8f6c\u6362\u6210AAB\u7684\u6b65\u9aa4\uff1a<\/p>\n

\u6b65\u9aa41\uff1a\u4e0b\u8f7d\u548c\u5b89\u88c5bundletool<\/p>\n

\u9996\u5148\uff0c\u60a8\u9700\u8981\u4e0b\u8f7d\u548c\u5b89\u88c5bundletool\u3002\u53ef\u4ee5\u5728\u4ee5\u4e0b\u7f51\u5740\u4e0a\u627e\u5230bundletool\u7684\u6700\u65b0\u7248\u672c\uff1ahttps:\/\/github.com\/google\/bundletool\/releases\u3002\u4e0b\u8f7d\u540e\uff0c\u5c06bundletool\u89e3\u538b\u5230\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u3002<\/p>\n

\u6b65\u9aa42\uff1a\u751f\u6210\u7b7e\u540d\u5bc6\u94a5<\/p>\n

\u8981\u5c06APK\u8f6c\u6362\u6210AAB\uff0c\u60a8\u9700\u8981\u4f7f\u7528\u7b7e\u540d\u5bc6\u94a5\u5bf9AAB\u8fdb\u884c\u7b7e\u540d\u3002\u5982\u679c\u60a8\u5df2\u7ecf\u6709\u7b7e\u540d\u5bc6\u94a5\uff0c\u8bf7\u8df3\u8fc7\u6b64\u6b65\u9aa4\u3002\u5426\u5219\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u751f\u6210\u4e00\u4e2a\u7b7e\u540d\u5bc6\u94a5\uff1a<\/p>\n

1. \u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u7a97\u53e3\u3002<\/p>\n

2. \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias<\/p>\n

“`<\/p>\n

3. \u6309\u7167\u63d0\u793a\u8f93\u5165\u76f8\u5173\u4fe1\u606f\uff0c\u4f8b\u5982\u5bc6\u94a5\u5e93\u5bc6\u7801\u3001\u522b\u540d\u548c\u522b\u540d\u5bc6\u7801\u7b49\u3002<\/p>\n

4. \u5c06\u7b7e\u540d\u5bc6\u94a5\u4fdd\u5b58\u5230\u5b89\u5168\u7684\u4f4d\u7f6e\u3002<\/p>\n

\u6b65\u9aa43\uff1a\u5c06APK\u8f6c\u6362\u6210AAB<\/p>\n

\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u5c06APK\u8f6c\u6362\u6210AAB\u3002\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n

1. \u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u7a97\u53e3\u3002<\/p>\n

2. \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

bundletool build-apks –bundle=\/path\/to\/your\/app.aab –output=\/path\/to\/output.apks –ks=\/path\/to\/your\/keystore.jks –ks-key-alias=my-alias –ks-pass=pass:your_keystore_password –key-pass=pass:your_key_password<\/p>\n

“`<\/p>\n

\u8bf7\u6ce8\u610f\uff0c\u60a8\u9700\u8981\u5c06\u201c\/path\/to\/your\/app.aab\u201d\u66ff\u6362\u4e3a\u60a8\u7684AAB\u6587\u4ef6\u8def\u5f84\uff0c\u5c06\u201c\/path\/to\/output.apks\u201d\u66ff\u6362\u4e3a\u8f93\u51faAPKS\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u5c06\u201c\/path\/to\/your\/keystore.jks\u201d\u66ff\u6362\u4e3a\u60a8\u7684\u7b7e\u540d\u5bc6\u94a5\u6587\u4ef6\u8def\u5f84\uff0c\u5c06\u201cmy-alias\u201d\u66ff\u6362\u4e3a\u60a8\u7684\u522b\u540d\uff0c\u5c06\u201cyour_keystore_password\u201d\u548c\u201cyour_key_password\u201d\u66ff\u6362\u4e3a\u60a8\u7684\u5bc6\u94a5\u5e93\u5bc6\u7801\u548c\u522b\u540d\u5bc6\u7801\u3002<\/p>\n

3. \u8fd0\u884c\u547d\u4ee4\u540e\uff0cbundletool\u5c06\u751f\u6210\u4e00\u4e2aAPKS\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u914d\u7f6e\u548c\u8d44\u6e90\u3002<\/p>\n

\u6b65\u9aa44\uff1a\u5c06AAB\u4e0a\u4f20\u5230Google Play\u5546\u5e97<\/p>\n

\u6700\u540e\uff0c\u60a8\u9700\u8981\u5c06AAB\u4e0a\u4f20\u5230Google Play\u5546\u5e97\uff0c\u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d\u548c\u4f7f\u7528\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n

1. \u6253\u5f00Google Play\u63a7\u5236\u53f0\uff0c\u5e76\u767b\u5f55\u60a8\u7684\u5f00\u53d1\u8005\u5e10\u6237\u3002<\/p>\n

2. \u9009\u62e9\u201c\u5e94\u7528\u7a0b\u5e8f\u201d>\u201c\u53d1\u5e03\u7ba1\u7406\u201d\u3002<\/p>\n

3. \u5355\u51fb\u201capk\u6253\u5305\u5de5\u5177pc<\/a>\u521b\u5efa\u5e94\u7528\u7a0b\u5e8f\u53d1\u5e03\u201d\u3002<\/p>\n

4. \u9009\u62e9\u201cAndroid App Bundle\u201d\u9009\u9879\uff0c\u5e76\u4e0a\u4f20\u60a8\u7684AAB\u6587\u4ef6\u3002<\/p>\n

5. \u914d\u7f6e\u5e94\u7528\u7a0b\u5e8f\u7684\u5176\u4ed6\u4fe1\u606f\uff0c\u4f8b\u5982\u5e94\u7528\u7a0b\u5e8f\u540d\u79f0\u3001\u63cf\u8ff0\u548c\u56fe\u6807\u7b49\u3002<\/p>\n

6. \u5355\u51fb\u201c\u53d1\u5e03\u201d\u6309\u94ae\uff0c\u5c06\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u53d1\u5e03\u5230Google Play\u5546\u5e97\u3002<\/p>\n

\u603b\u7ed3<\/p>\n

\u5c06APK\u8f6c\u6362\u6210AAB\u53ef\u4ee5\u51cf\u5c11\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u5927\u5c0f\uff0c\u5e76\u63d0\u9ad8\u7528\u6237\u7684\u4e0b\u8f7d\u901f\u5ea6\u3002\u6b64\u5916\uff0cAAB\u683c\u5f0f\u8fd8\u53ef\u4ee5\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u66f4\u597d\u7684\u5b89\u5168\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002\u8981\u5c06APK\u8f6c\u6362\u6210AAB\uff0c\u60a8\u9700\u8981\u4f7f\u7528Google\u7684bundletool\u5de5\u5177\uff0c\u5e76\u751f\u6210\u4e00\u4e2a\u7b7e\u540d\u5bc6\u94a5\u5bf9AAB\u8fdb\u884c\u7b7e\u540d\u3002\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u5c06AAB\u4e0a\u4f20\u5230Google Pl<\/p>\n

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

ay\u5546\u5e97\uff0c\u4ee5\u4f9b\u7528\u6237\u4e0b\u8f7d\u548c\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

APK\u548cAAB\u90fd\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u683c\u5f0f\uff0c\u4f46\u5b83\u4eec\u4e4b\u95f4\u6709\u5f88\u5927\u7684\u533a\u522b\u3002APK\u662fAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u4f20\u7edf\u683c\u5f0f\uff0c\u800cAAB\u5219\u662fGoogle Play\u7684\u9996\u9009\u683c\u5f0f\u3002AAB\u6587\u4ef6\u6bd4APK\u6587\u4ef6\u66f4\u5c0f\uff0c\u53ef\u4ee5\u51cf\u5c11\u5e94<\/p>\n","protected":false},"author":23,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20573,20574,250,116,1057],"topic":[],"class_list":["post-17833","post","type-post","status-publish","format-standard","hentry","category-kaifaapp","tag-iosapp","tag-iosipa","tag-250","tag-116","tag-1057"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/17833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/comments?post=17833"}],"version-history":[{"count":1,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/17833\/revisions"}],"predecessor-version":[{"id":17850,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/17833\/revisions\/17850"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/media?parent=17833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/categories?post=17833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/tags?post=17833"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/topic?post=17833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}