{"id":7647,"date":"2023-06-28T17:50:49","date_gmt":"2023-06-28T09:50:49","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/?p=7647"},"modified":"2023-06-28T17:50:49","modified_gmt":"2023-06-28T09:50:49","slug":"%e5%ae%89%e5%8d%93%e5%90%8c%e6%97%b6%e6%89%93%e5%8c%85aab%e5%92%8capk%e6%80%8e%e4%b9%88%e5%81%9a","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appkaifa\/7647.html","title":{"rendered":"\u5b89\u5353\u540c\u65f6\u6253\u5305aab\u548capk\u600e\u4e48\u505a?"},"content":{"rendered":"<p>\u5728\u5b89\u5353\u5e94\u7528\u5f00\u53d1\u4e2d\uff0c\u901a\u5e38\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210APK\u683c\u5f0f\u8fdb\u884c\u53d1\u5e03\u3002\u7136\u800c\uff0c\u968f\u7740Google Play Store\u7684\u63a8\u51fa\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210 AAB\uff08Android App Bundle\uff09\u683c\u5f0f\u8fdb\u884c\u53d1\u5e03\u3002AAB\u6587\u4ef6\u662f\u4e00\u79cd\u65b0\u7684\u5e94\u7528\u7a0b\u5e8f\u5206\u53d1\u683c\u5f0f\uff0c\u5b83\u5141\u8bb8\u5f00\u53d1\u8005\u6839\u636e\u7528\u6237\u8bbe\u5907\u7684\u7279\u5b9a\u914d\u7f6e\u52a8\u6001\u751f\u6210APK\u6587\u4ef6\u3002\u4f46\u662f\uff0c\u6709\u4e9b\u5f00\u53d1\u8005\u5e0c\u671b\u540c\u65f6\u6253\u5305AAB\u548cAPK\u6587\u4ef6\uff0c\u4ee5\u4fbf\u5728\u4e0d\u540c\u7684\u5e94\u7528\u5546\u5e97\u548c\u6e20\u9053\u4e2d\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u3002\u4e0b\u9762\u662f\u540c\u65f6\u6253\u5305AAB\u548cAPK\u7684\u8be6\u7ec6\u4ecb\u7ecd\u3002<\/p>\n<p>## \u4ec0\u4e48\u662fAAB\u6587\u4ef6\uff1f<\/p>\n<p>AAB\u6587\u4ef6\u662f\u4e00\u79cdAndroid\u5e94\u7528\u7a0b\u5e8f\u5206\u53d1\u683c\u5f0f\uff0c\u5b83\u5141\u8bb8\u5f00\u53d1\u8005\u6839\u636e\u7528\u6237\u8bbe\u5907\u7684\u7279\u5b9a\u914d\u7f6e\u52a8\u6001\u751f\u6210APK\u6587\u4ef6\u3002AAB\u6587\u4ef6\u5305\u542b\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u8d44\u6e90\u548c\u4ee3\u7801\uff0c\u4f46\u4e0d\u5305\u62ec\u7f16\u8bd1\u540e\u7684\u4ee3\u7801\u3002\u5728\u4e0a\u4f20\u5230Google Play\u65f6\uff0cAAB\u6587\u4ef6\u5c06\u88ab\u8f6c\u6362\u4e3a\u591a\u4e2aAPK\u6587\u4ef6\uff0c\u6bcf\u4e2aAPK\u6587\u4ef6\u90fd\u9002\u5408\u7279\u5b9a\u8bbe\u5907\u7684\u914d\u7f6e\u3002<\/p>\n<p>## \u4e3a\u4ec0\u4e48\u9700\u8981\u540c\u65f6\u6253\u5305AAB\u548cAPK\uff1f<\/p>\n<p>\u6709\u4e9b\u5f00\u53d1\u8005\u5e0c\u671b\u5728\u4e0d\u540c\u7684\u5e94\u7528\u5546\u5e97\u548c\u6e20\u9053\u4e2d\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u3002\u4f8b\u5982\uff0c\u5728\u4e2d\u56fd\uff0c\u5e94\u7528\u5546\u5e97\u4e2d\u6d41\u884c\u7684\u683c\u5f0f\u662fAPK\uff0c\u800c\u5728Goo<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-1261.html\">\u5728\u7ebf\u6253\u5305ios\u8f6f\u4ef6<\/a>gle Play Store\u4e2d\uff0c\u6d41\u884c\u7684\u683c\u5f0f\u662fAAB\u3002\u56e0\u6b64\uff0c\u5f00\u53d1\u8005\u9700\u8981\u540c\u65f6\u6253\u5305AAB\u548cAPK\u6587\u4ef6\u4ee5\u4fbf\u5728\u4e0d\u540c\u7684\u5e94\u7528\u5546\u5e97\u548c\u6e20\u9053\u4e2d\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>## \u5982\u4f55\u540c\u65f6\u6253\u5305AAB\u548cAPK\uff1f<\/p>\n<p>\u6253\u5305AAB\u548cAPK\u6587\u4ef6\u9700\u8981\u4f7f\u7528Android Studio\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u5728Android Studio\u4e2d\u6253\u5f00\u9879\u76ee\uff0c\u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u201cFlavors\u201d\uff08\u53e3\u5473\uff09\u3002<\/p>\n<p>2. \u5728\u201cBuild Variants\u201d\uff08\u6784\u5efa\u53d8\u4f53\uff09\u4e2d\uff0c\u9009\u62e9\u201cFlavor\u201d\uff08\u53e3\u5473\uff09\u3002<\/p>\n<p>3. \u5728\u201cBuild Type\u201d\uff08\u6784\u5efa\u7c7b\u578b\uff09\u4e2d\uff0c\u9009\u62e9\u201cRelease\u201d\uff08\u53d1\u5e03\uff09\u3002<\/p>\n<p>4. \u5728\u201cSigning Config\u201d\uff08\u7b7e\u540d\u914d\u7f6e\uff09\u4e2d\uff0c\u9009\u62e9\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u8bc1\u4e66<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/16\/10\/25240958719.jpg\" \/><\/figure>\n<\/p>\n<p>\u3002<\/p>\n<p>5. \u5728\u201cFlavors\u201d\uff08\u53e3\u5473\uff09\u4e2d\uff0c\u9009\u62e9\u201cdimension\u201d\uff08\u7ef4\u5ea6\uff09\u3002<\/p>\n<p>6. \u5728\u201cFlavors\u201d\uff08\u53e3\u5473\uff09\u4e2d\uff0c\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u53e3\u5473\uff0c\u5e76\u5c06\u5176\u547d\u540d\u4e3a\u201caab\u201d\u3002<\/p>\n<p>7. \u5728\u201cFlavors\u201d\uff08\u53e3\u5473\uff09\u4e2d\uff0c\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u53e3\u5473\uff0c\u5e76\u5c06\u5176\u547d\u540d\u4e3a\u201capk\u201d\u3002<\/p>\n<p>8. \u5728\u201cBuild Types\u201d\uff08\u6784\u5efa\u7c7b\u578b\uff09\u4e2d\uff0c\u9009\u62e9\u201cdebug\u201d\uff08\u8c03\u8bd5\uff09\u3002<\/p>\n<p>9. \u5728\u201cSigning Config\u201d\uff08\u7b7e\u540d\u914d\u7f6e\uff09\u4e2d\uff0c\u9009\u62e9\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u8bc1\u4e66\u3002<\/p>\n<p>10. \u5728\u201cBuild Types\u201d\uff08\u6784\u5efa\u7c7b\u578b\uff09\u4e2d\uff0c\u9009\u62e9\u201crelease\u201d\uff08\u53d1\u5e03\uff09\u3002<\/p>\n<p>11. \u5728\u201cSigning Config\u201d\uff08\u7b7e\u540d\u914d\u7f6e\uff09\u4e2d\uff0c\u9009\u62e9\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7b7e\u540d\u8bc1\u4e66\u3002<\/p>\n<p>12. \u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684build.gradle\u6587\u4ef6\u4e2d\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>&#8220;`groovy<\/p>\n<p>flavorDimensions &#8220;version&#8221;<\/p>\n<p>productFlavors {<\/p>\n<p>    aab {<\/p>\n<p>        dimension &#8220;version&#8221;<\/p>\n<p>    }<\/p>\n<p>    apk {<\/p>\n<p>        dimension &#8220;version&#8221;<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p>android.applicationVariants.all { variant -&gt;<\/p>\n<p>    variant.outputs.all { output -&gt;<\/p>\n<p>        def project = &#8220;MyApp&#8221;<\/p>\n<p>        def version = variant.versionName<\/p>\n<p>        def flavor = variant.productFlavors[0].name<\/p>\n<p>        def buildType = variant.buildType.name<\/p>\n<p>        def fileName = &#8220;${project}-${flavor}-${buildType}-${version}.${output.outputFile.extension}&#8221;<\/p>\n<p>        outputFileName = fileName<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p>&#8220;`<\/p>\n<p>13. \u70b9\u51fb\u201cBuild\u201d\uff08\u6784\u5efa\uff09\u6309\u94ae\uff0c\u5e76\u9009\u62e9\u201cGenerate Signed Bundle\/APK\u201d\uff08\u751f\u6210\u7b7e\u540d\u5305\/APK\uff09\u3002<\/p>\n<p>14. \u9009\u62e9\u201cAndroid App Bundle\u201d\uff08Android\u5e94\u7528\u7a0b\u5e8f\u5305\uff09\u5e76\u8f93\u5165\u60a8\u7684\u7b7e\u540d\u4fe1\u606f\u3002<\/p>\n<p>15. \u70b9\u51fb\u201cNext\u201d\uff08\u4e0b\u4e00\u6b65\uff09\uff0c\u9009\u62e9\u201cBuild a bundle(s) and APK(s)\u201d\uff08\u6784\u5efa\u5305\u548cAPK\uff09\u3002<\/p>\n<p>16. \u70b9\u51fb\u201cFinish\u201d\uff08\u5b8c\u6210\uff09\u6309\u94ae\uff0cAndroid Studio\u5c06\u540c\u65f6\u751f\u6210AAB\u548cAPK\u6587\u4ef6\u3002<\/p>\n<p>## \u7ed3\u8bba<\/p>\n<p>\u540c\u65f6\u6253\u5305AAB\u548cAPK\u6587\u4ef6\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u5728\u4e0d\u540c\u7684\u5e94\u7528\u5546\u5e97\u548c\u6e20\u9053\u4e2d\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u3002\u4f7f\u7528Android Studi<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-2305.html\">\u628a\u6587\u4ef6\u6253\u5305\u6210app<\/a>o\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210AAB\u548cAPK\u6587\u4ef6\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u6269\u5927\u5e94\u7528\u7a0b\u5e8f\u7684\u53d7\u4f17\u8303\u56f4\uff0c\u5e76\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0b\u8f7d\u91cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5b89\u5353\u5e94\u7528\u5f00\u53d1\u4e2d\uff0c\u901a\u5e38\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210APK\u683c\u5f0f\u8fdb\u884c\u53d1\u5e03\u3002\u7136\u800c\uff0c\u968f\u7740Google Play Store\u7684\u63a8\u51fa\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210 AAB\uff08Android App Bundle\uff09\u683c\u5f0f\u8fdb\u884c\u53d1<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[11484,11483,1775,789,802],"class_list":["post-7647","post","type-post","status-publish","format-standard","hentry","category-appkaifa","tag-h5app","tag-muiapkhtml5","tag-1775","tag-789","tag-802"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/7647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=7647"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/7647\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=7647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=7647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=7647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}