{"id":560,"date":"2020-06-10T17:46:38","date_gmt":"2020-06-10T09:46:38","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=560"},"modified":"2022-12-13T10:47:40","modified_gmt":"2022-12-13T02:47:40","slug":"android-multidex64k%e9%99%90%e5%88%b6","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/android-multidex64k%e9%99%90%e5%88%b6\/","title":{"rendered":"\u3010Android\u3011Multidex \u7a81\u783464K\u9650\u5236 \u7bc4\u4f8b"},"content":{"rendered":"<h1>\u3010Android\u3011Multidex \u7a81\u783464K\u9650\u5236 \u7bc4\u4f8b<\/h1>\n<h4>Android Multidex \u662f\u4e00\u7a2e\u5c0d\u65bc\u8f03\u5927 Android \u61c9\u7528\u7a0b\u5f0f\u7684\u652f\u6301\uff0c\u5b83\u7684\u88dd\u8f09\u9ad4\u628a\u55ae\u500b\u61c9\u7528\u4e2d\u7684\u6700\u591a 65,534 \u500b\u65b9\u6cd5\u5206\u5272\u5230\u591a\u500b\u53eb\u505a dex \u6587\u4ef6\u7684 dex \u5eab\u4e2d\uff0c\u4ee5\u6eff\u8db3 Dalvik \u7121\u6cd5\u4e00\u6b21\u5efa\u7acb\u5927\u91cf\u65b9\u6cd5\u7684\u9650\u5236\u3002<\/h4>\n<h4>Multidex \u6280\u8853\u6709\u52a9\u65bc\u6e1b\u5c11\u51fa\u73fe\u5728\u6c92\u6709\u4f7f\u7528\u5b83\u6642\u53ef\u80fd\u4f86\u81ea\u53c3\u8003\u7206\u70b8\u6027\u589e\u9577\u7684\u554f\u984c\uff0c\u5f9e\u800c\u53ef\u4ee5\u5efa\u7acb\u8f03\u5927\u4e14\u529f\u80fd\u8f03\u8c50\u5bcc\u7684 Android \u61c9\u7528\u7a0b\u5f0f\u3002<\/h4>\n<hr \/>\n<h4>\u6587\u7ae0\u76ee\u9304<\/h4>\n<ol>\n<li><a href=\"#a\">Multidex Android 5.0 API21 \u4ee5\u4e0a<\/a><\/li>\n<li><a href=\"#b\">Multidex Android 5.0 API21 \u4ee5\u4e0b<\/a><\/li>\n<li><a href=\"#c\">Developer Documents Multidex<\/a><\/li>\n<\/ol>\n<hr \/>\n<p><a id=\"a\"><\/a><\/p>\n<h4>1.Multidex Android 5.0 API21 \u4ee5\u4e0a<\/h4>\n<h5>\u5982\u679c minSdk \u8a2d\u70ba 21 \u4ee5\u4e0a\uff0c\u6839\u64da\u9810\u8a2d\u6703\u555f\u7528 Multidex\uff0c\u4e14\u4e0d\u9700\u8981 Multidex \u7a0b\u5f0f\u5eab\u3002<\/h5>\n<h5>build.gradle<\/h5>\n<pre><code class=\"language-groovy line-numbers\">defaultConfig {\n    minSdk 28\n}\n<\/code><\/pre>\n<p><a id=\"b\"><\/a><\/p>\n<h4>2.Multidex Android 5.0 API21 \u4ee5\u4e0b<\/h4>\n<h5>build.gradle<\/h5>\n<pre><code class=\"language-groovy line-numbers\">android {\n    defaultConfig {\n        multiDexEnabled true\n    }\n}\n\ndependencies {\n    def multidex_version = \"2.0.1\"\n    implementation \"androidx.multidex:multidex:$multidex_version\"\n}\n<\/code><\/pre>\n<h5>\u4e0d\u8986\u5beb Application<\/h5>\n<h5>AndroidManifest.xml<\/h5>\n<pre data-language=XML><code class=\"language-markup line-numbers\">&lt;application\n    android:name=\"androidx.multidex.MultiDexApplication\"&gt;\n&lt;\/application&gt;\n<\/code><\/pre>\n<h5>\u8986\u5beb Application<\/h5>\n<h5>MyApplication.kt<\/h5>\n<pre><code class=\"language-kotlin line-numbers\">class MyApplication : MultiDexApplication() {\n\n    override fun attachBaseContext(base: Context?) {\n        super.attachBaseContext(base)\n        MultiDex.install(this)\n    }\n}\n<\/code><\/pre>\n<h5>AndroidManifest.xml<\/h5>\n<pre data-language=XML><code class=\"language-markup line-numbers\">&lt;application\n    android:name=\".MyApplication\"&gt;\n&lt;\/application&gt;\n<\/code><\/pre>\n<p><a id=\"c\"><\/a><\/p>\n<h4>3.Developer Documents Multidex<\/h4>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/developer.android.com\/studio\/build\/multidex\" title=\"Open in Documents Multidex\" target=\"_blank\" rel=\"noopener\">Open in Documents Multidex<\/a><\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u3010Android\u3011Multidex \u7a81\u783464K\u9650\u5236 \u7bc4\u4f8b Android Multidex \u662f\u4e00\u7a2e\u5c0d\u65bc\u8f03\u5927 A &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[5],"tags":[13,81,219],"class_list":["post-560","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-multidex","tag-64k"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/comments?post=560"}],"version-history":[{"count":3,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"predecessor-version":[{"id":1615,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/560\/revisions\/1615"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}