apk\u6253\u5305\u540e\u5b89\u88c5\u5931\u8d25<\/a>aultConfig` \u4ee3\u7801\u5757\u4e2d\uff0c\u8bbe\u7f6e\u5e94\u7528\u7a0b\u5e8f\u7684\u5305\u540d\u3001\u7248\u672c\u53f7\u7b49\u4fe1\u606f\u3002\u4f8b\u5982\uff1a<\/p>\n “`<\/p>\n
defaultConfig {<\/p>\n
\/\/ \u5e94\u7528\u7a0b\u5e8f\u7684\u5305\u540d<\/p>\n
applicationId “com.example.myapp”<\/p>\n<\/p>\n
\/\/ \u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7<\/p>\n
versionCode 1<\/p>\n
versionName “1.0”<\/p>\n<\/p>\n
\/\/ \u5176\u4ed6\u914d\u7f6e\u4fe1\u606f…<\/p>\n
}<\/p>\n
“`<\/p>\n
\u5728\u8fd9\u91cc\uff0c\u4f60\u9700\u8981\u5c06 `applicationId` \u7684\u503c\u8bbe\u7f6e\u4e3a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u5b9e\u9645\u5305\u540d\uff0c\u5c06 `versionCode` \u7684\u503c\u8bbe\u7f6e\u4e3a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u53f7\uff0c\u5c06 `versionName` \u7684\u503c\u8bbe\u7f6e\u4e3a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u7248\u672c\u540d\u3002<\/p>\n
7. \u786e\u4fdd\u4f60\u5df2\u7ecf\u8fde\u63a5\u4e86 Android \u8bbe\u5907\u6216\u542f\u52a8\u4e86 Android \u6a21\u62df\u5668\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 USB \u8fde\u63a5 Android \u8bbe\u5907\uff0c\u6216\u8005\u9009\u62e9\u4e00\u4e2a\u5df2\u7ecf\u521b\u5efa\u597d\u7684 Android \u865a\u62df\u8bbe\u5907\u3002<\/p>\n
8. \u5728 Android Studio \u7684\u83dc\u5355\u680f\u4e2d\uff0c\u9009\u62e9 “Build” -> “Build Bundle(s) \/ APK(s)” -> “Build APK(s)”\u3002\u8fd9\u5c06\u5f00\u59cb\u6784\u5efa APK \u6587\u4ef6\u7684\u8fc7\u7a0b\u3002<\/p>\n
9. \u6784\u5efa\u5b8c\u6210\u540e\uff0c\u5728 “Build” -> “Reveal in Finder”\uff08Mac\uff09\u6216\u8005 “Build” -> “Open Explorer”\uff08Windows\uff09\u4e2d\u627e\u5230\u751f\u6210\u7684 APK \u6587\u4ef6\u3002APK \u6587\u4ef6\u9ed8\u8ba4\u4f1a\u5b58\u50a8\u5728\u9879\u76ee\u7684 `app` \u6587\u4ef6\u5939\u4e0b\u7684 `build\/outputs\/apk` \u76ee\u5f55\u4e2d\u3002<\/p>\n
10. \u5c06\u751f\u6210\u7684 APK \u6587\u4ef6\u62f7\u8d1d\u5230 Android \u8bbe\u5907\u4e0a\uff0c\u7136\u540e\u5728\u8bbe\u5907\u4e0a\u70b9\u51fb APK \u6587\u4ef6\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n
\u4ee5\u4e0a\u5c31\u662f\u4f7f\u7528 Android Studio \u6253\u5305 APK \u7684\u57fa\u672c\u6b65\u9aa4\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5728\u53d1\u5e03\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u4f60\u5e94\u8be5\u4f7f\u7528 release\uff08\u53d1\u5e03\uff09\u6784\u5efa\u7c7b\u578b\u6765\u6253\u5305 APK\uff0c\u4ee5\u83b7\u5f97\u66f4\u9ad8\u7684\u6027\u80fd\u548c\u66f4\u4f4e\u7684\u5b89\u5168\u98ce\u9669\u3002\u53d1\u5e03\u7248\u672c\u7684 APK \u901a\u5e38\u4f1a\u8fdb\u884c\u4ee3\u7801\u6df7\u6dc6\u548c\u7b7e<\/p>\n
<\/figure>\n<\/p>\n\u540d\u5904\u7406\uff0c\u4ee5\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u5b89\u5168\u6027\u3002<\/p>\n
\u5e0c\u671b\u4ee5\u4e0a\u5185\u5bb9\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u5e76\u4e14\u80fd\u591f\u987a\u5229\u5b8c\u6210 APK \u7684\u6253\u5305\u8fc7\u7a0b\u3002\u5982\u679c\u4f60\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u5411\u6211\u63d0\u95ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u6253\u5305APK\u662fAndroid\u5f00\u53d1\u4e2d\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\uff0c\u56e0\u4e3a\u5b83\u5c06\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u4ee3\u7801\u3001\u8d44\u6e90\u6587\u4ef6\u548c\u914d\u7f6e\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u4ee5\u5728Android\u8bbe\u5907\u4e0a\u5b89\u88c5\u548c\u8fd0\u884c\u7684\u6587\u4ef6\u3002\u5728 Android \u5f00\u53d1\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 Andr<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[6937,12,6938,16,1788],"topic":[],"class_list":{"0":"post-3464","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-appkf","7":"tag-apk","8":"tag-12","10":"tag-16","11":"tag-1788"},"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=3464"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3464\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=3464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=3464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=3464"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=3464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}