{"id":66010,"date":"2026-04-02T17:48:14","date_gmt":"2026-04-02T09:48:14","guid":{"rendered":"https:\/\/www.yimenapp.net\/knowledge\/?p=66010"},"modified":"2026-04-02T17:48:14","modified_gmt":"2026-04-02T09:48:14","slug":"apk%e6%89%93%e5%8c%8532%e4%bd%8d%e5%8c%85%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenapp.net\/knowledge\/blog-66010.html","title":{"rendered":"apk\u6253\u530532\u4f4d\u5305\u5982\u4f55\u5b9e\u73b0\u7684\uff1f"},"content":{"rendered":"<p>APK\u6253\u530532\u4f4d\u5305\u53c8\u79f0\u4e3a32\u4f4d\u517c\u5bb9\u6027\u6253\u5305\uff0c\u662f\u4e3a\u4e86\u8ba9\u5e94\u7528\u7a0b\u5e8f\u572832\u4f4d\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u800c\u8fdb\u884c\u7684\u6253\u5305\u3002\u5728Android\u7cfb\u7edf\u4e2d\uff0c\u6709\u4e24\u79cdCPU\u67b6\u6784\uff0c\u4e00\u79cd\u662fARM\u67b6\u6784\uff0c\u53e6\u4e00\u79cd\u662fx86\u67b6\u6784\u3002ARM\u67b6\u6784\u7684\u8bbe\u5907\u5305\u62ec\u5927\u591a\u6570\u7684Android\u624b\u673a\u548c\u5e73\u677f\u7535\u8111\uff0c\u800cx86\u67b6\u6784\u7684\u8bbe\u5907\u5219\u5305\u62ec\u4e00\u4e9bIntel\u5904\u7406\u5668\u7684\u8bbe\u5907\u3002\u56e0\u6b64\uff0c\u5982\u679c\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u53ea\u6253\u5305\u4e86ARM\u67b6\u6784\u7684\u5305\uff0c\u90a3\u4e48\u5728x86\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u65f6\u5c31\u4f1a\u51fa\u73b0\u517c\u5bb9\u6027\u95ee\u9898\u3002<\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/20\/17\/32433836410.jpg\" \/><\/figure>\n<\/p>\n<p>\u9898\uff0cAndroid\u7cfb\u7edf\u63d0\u4f9b\u4e86\u4e00\u4e2a32\u4f4d\u517c\u5bb9\u6027\u5e93\uff0c\u4e5f\u5c31\u662flibhoudini\u3002\u8fd9\u4e2a\u5e93\u53ef\u4ee5\u5c06ARM\u67b6\u6784\u7684\u4ee3\u7801\u8f6c\u6362\u6210x86\u67b6\u6784\u7684\u4ee3\u7801\uff0c\u4ece\u800c\u8ba9\u5e94\u7528\u7a0b\u5e8f\u5728x86\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002\u4f46\u662f\uff0c\u4f7f\u7528\u8fd9\u4e2a\u5e93\u4f1a\u589e\u52a0\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u5f00\u9500\uff0c\u56e0\u6b64\u5982\u679c\u4f60\u60f3\u8ba9\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u5728x86\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u66f4\u5feb\uff0c\u5c31\u9700\u8981\u8fdb\u884c32\u4f4d\u517c\u5bb9\u6027\u6253\u5305\u3002<\/p>\n<p>\u4e0b\u9762\u662fAPK\u6253\u530532\u4f4d\u5305\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff1a<\/p>\n<p>1. \u51c6\u5907\u5de5\u4f5c<\/p>\n<p>\u5728\u8fdb\u884c32\u4f4d\u517c\u5bb9\u6027\u6253\u5305\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u5148\u68c0\u67e5\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u662f\u5426\u5df2\u7ecf\u5305\u542b\u4e8632\u4f4d\u517c\u5bb9\u6027\u5e93\u3002\u4f60\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u7684libs\u76ee\u5f55\u4e0b\u67e5\u770b\u662f\u5426\u6709libhoudini.so\u6587\u4ef6\u3002\u5982\u679c\u6ca1\u6709\uff0c\u4f60\u9700\u8981\u5148\u4e0b\u8f7d\u8fd9\u4e2a\u5e93\uff0c\u5e76\u5c06\u5b83\u653e\u5230\u5e94\u7528\u7a0b\u5e8f\u7684libs\u76ee\u5f55\u4e0b\u3002<\/p>\n<p>2. \u4fee\u6539Gradle\u914d\u7f6e<\/p>\n<p>\u5728\u8fdb\u884c32\u4f4d\u517c\u5bb9\u6027\u6253\u5305\u4e4b\u524d\uff0c\u4f60\u9700\u8981\u4fee\u6539\u5e94\u7528\u7a0b\u5e8f\u7684Gradle\u914d\u7f6e\u6587\u4ef6\u3002\u6253\u5f00\u5e94\u7528\u7a0b\u5e8f\u7684build.gradle\u6587\u4ef6\uff0c\u5728android\u8282\u70b9\u4e0b\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>&#8220;`gradle<\/p>\n<p>splits {<\/p>\n<p>    abi {<\/p>\n<p>        enable true<\/p>\n<p>        reset()<\/p>\n<p>        include &#8216;armeabi-v7a&#8217;, &#8216;x86&#8217;<\/p>\n<p>        universalApk false<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p>project.ext.versionCodes = [&#8216;armeabi-v7a&#8217;: 1, &#8216;x86&#8217;: 2]<\/p>\n<p>android.applicationVariants.all { variant -&gt;<\/p>\n<p>    variant.outputs.each { output -&gt;<\/p>\n<p>        def file = output.outputFile<\/p>\n<p>        if (file != null &amp;&amp; file.name.endsWith(&#8216;.apk&#8217;)) {<\/p>\n<p>            output.versionCodeOverride =<\/p>\n<p>                project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) * 1000000 + android.defaultConfig.version<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-1310.html\">apk\u4fee\u6539\u6253\u5305<\/a>Code<\/p>\n<p>        }<\/p>\n<p>    }<\/p>\n<p>}<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u7684\u4f5c\u7528\u662f\u544a\u8bc9Gradle\uff0c\u4f60\u60f3\u8981\u8fdb\u884c32\u4f4d\u517c\u5bb9\u6027\u6253\u5305\uff0c\u5e76\u6307\u5b9a\u8981\u6253\u5305\u7684\u67b6\u6784\u4e3aarmeabi-v7a\u548cx86\u3002\u540c\u65f6\uff0c\u4f60\u9700\u8981\u6307\u5b9a\u6bcf\u4e2a\u67b6\u6784\u5bf9\u5e94\u7684versionCode\u3002\u8fd9\u91cc\u6211\u4eec\u5c06armeabi-v7a\u7684versionCode\u8bbe\u7f6e\u4e3a1\uff0c\u5c06x86\u7684versionCode\u8bbe\u7f6e\u4e3a2\u3002<\/p>\n<p>3. \u6267\u884c\u6253\u5305\u547d\u4ee4<\/p>\n<p>\u4fee\u6539\u5b8cGradle\u914d\u7f6e\u4e4b\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u6267\u884c\u6253\u5305\u547d\u4ee4\u4e86\u3002\u5728\u7ec8\u7aef\u4e2d\u8fdb\u5165\u5e94\u7528\u7a0b\u5e8f\u7684\u6839\u76ee\u5f55\uff0c\u7136\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`bash<a href=\"https:\/\/appdabao.yimenapp.com\/jiage-233.html\">app\u6df7\u5408\u6253\u5305<\/a><\/p>\n<p>.\/gradlew clean<\/p>\n<p>.\/gradlew assembleRelease<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u4e24\u4e2aAPK\u6587\u4ef6\uff0c\u4e00\u4e2a\u662farmeabi-v7a\u67b6\u6784\u7684\u5305\uff0c\u53e6\u4e00\u4e2a\u662fx86\u67b6\u6784\u7684\u5305\u3002\u5728\u6253\u5305\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u7684build\/outputs\/apk\u76ee\u5f55\u4e0b\u627e\u5230\u8fd9\u4e24\u4e2aAPK\u6587\u4ef6\u3002<\/p>\n<p>4. \u5b89\u88c5\u6d4b\u8bd5<\/p>\n<p>\u6700\u540e\uff0c\u4f60\u9700\u8981\u5c06\u8fd9\u4e24\u4e2aAPK\u6587\u4ef6\u5b89\u88c5\u5230\u4e0d\u540c\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fdb\u884c\u6d4b\u8bd5\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Android Studio\u7684\u6a21\u62df\u5668\u6216\u8005\u771f\u673a\u8fdb\u884c\u6d4b\u8bd5\u3002\u5728\u6d4b\u8bd5\u65f6\uff0c\u4f60\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<p>&#8211; \u5982\u679c\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u5305\u542b\u4e86native\u4ee3\u7801\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u5728\u6d4b\u8bd5\u65f6\u7279\u522b\u6ce8\u610f\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u4ee3\u7801\u53ef\u80fd\u4f1a\u51fa\u73b0\u517c\u5bb9\u6027\u95ee\u9898\u3002<\/p>\n<p>&#8211; \u5982\u679c\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\u4e86\u7b2c\u4e09\u65b9\u5e93\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u786e\u4fdd\u8fd9\u4e9b\u5e93\u4e5f\u652f\u630132\u4f4d\u517c\u5bb9\u6027\u6253\u5305\u3002<\/p>\n<p>\u603b\u4e4b\uff0cAPK\u6253\u530532\u4f4d\u5305\u662f\u4e00\u4e2a\u6bd4\u8f83\u590d\u6742\u7684\u8fc7\u7a0b\uff0c\u4f46\u662f\u5b83\u53ef\u4ee5\u8ba9\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u5728\u4e0d\u540c\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u66f4\u52a0\u7a33\u5b9a\u548c\u6d41\u7545\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>APK\u6253\u530532\u4f4d\u5305\u53c8\u79f0\u4e3a32\u4f4d\u517c\u5bb9\u6027\u6253\u5305\uff0c\u662f\u4e3a\u4e86\u8ba9\u5e94\u7528\u7a0b\u5e8f\u572832\u4f4d\u67b6\u6784\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\u800c\u8fdb\u884c\u7684\u6253\u5305\u3002\u5728Android\u7cfb\u7edf\u4e2d\uff0c\u6709\u4e24\u79cdCPU\u67b6\u6784\uff0c\u4e00\u79cd\u662fARM\u67b6\u6784\uff0c\u53e6\u4e00\u79cd\u662fx86\u67b6\u6784\u3002ARM\u67b6\u6784\u7684\u8bbe\u5907\u5305\u62ec\u5927<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[6335,4388,63,3638,45731],"topic":[],"class_list":["post-66010","post","type-post","status-publish","format-standard","hentry","category-blog","tag-webpackapp","tag-4388","tag-63","tag-3638","tag-app"],"_links":{"self":[{"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/posts\/66010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/comments?post=66010"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/posts\/66010\/revisions"}],"predecessor-version":[{"id":66066,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/posts\/66010\/revisions\/66066"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/media?parent=66010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/categories?post=66010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/tags?post=66010"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenapp.net\/knowledge\/wp-json\/wp\/v2\/topic?post=66010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}