{"id":7958,"date":"2022-09-20T10:23:03","date_gmt":"2022-09-20T02:23:03","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/?p=7958"},"modified":"2022-09-20T10:23:08","modified_gmt":"2022-09-20T02:23:08","slug":"%e5%b0%8f%e7%b1%b3%e5%bc%80%e6%94%be%e5%b9%b3%e5%8f%b0%e5%ba%94%e7%94%a8%e5%95%86%e5%ba%97%e6%94%af%e6%8c%81-64-%e4%bd%8d%e6%9e%b6%e6%9e%84%e9%80%82%e9%85%8d","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/7958\/","title":{"rendered":"\u5c0f\u7c73\u5f00\u653e\u5e73\u53f0\u5e94\u7528\u5546\u5e97\u652f\u6301 64 \u4f4d\u67b6\u6784\u9002\u914d"},"content":{"rendered":"\n<p>4 \u4f4d CPU \u80fd\u591f\u4e3a\u60a8\u7684\u7528\u6237\u63d0\u4f9b\u66f4\u5feb\u3001\u66f4\u4e30\u5bcc\u7684\u4f53\u9a8c\u3002\u6dfb\u52a0 64 \u4f4d\u7684\u5e94\u7528\u7248\u672c\u4e0d\u4ec5\u53ef\u4ee5\u63d0\u5347\u6027\u80fd\u3001\u4e3a\u672a\u6765\u521b\u65b0\u521b\u9020\u6761\u4ef6\uff0c\u8fd8\u80fd\u9488\u5bf9\u4ec5\u652f\u6301 64 \u4f4d\u67b6\u6784\u7684\u8bbe\u5907\u505a\u597d\u51c6\u5907\u3002<\/p>\n\n\n\n<p>\u672c\u6307\u5357\u4ecb\u7ecd\u4e86\u5982\u4f55\u786e\u4fdd 32 \u4f4d\u5e94\u7528\u4e3a\u652f\u6301 64 \u4f4d\u8bbe\u5907\u505a\u597d\u51c6\u5907\uff0c\u4f9b\u60a8\u968f\u65f6\u91c7\u7528\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_0\"><strong>\u8bc4\u4f30\u60a8\u7684\u5e94\u7528<\/strong><\/h2>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u5e94\u7528\u4ec5\u4f7f\u7528\u4ee5 Java \u7f16\u7a0b\u8bed\u8a00\u6216 Kotlin \u7f16\u5199\u7684\u4ee3\u7801\uff08\u5305\u62ec\u6240\u6709\u5e93\u6216 SDK\uff09\uff0c\u90a3\u4e48\u5c31\u8868\u793a\u8be5\u5e94\u7528\u5df2\u7ecf\u80fd\u652f\u6301 64 \u4f4d\u8bbe\u5907\u3002\u5982\u679c\u60a8\u7684\u5e94\u7528\u4f7f\u7528\u4e86\u4efb\u4f55\u539f\u751f\u4ee3\u7801\uff0c\u6216\u8005\u60a8\u4e0d\u786e\u5b9a\u5e94\u7528\u662f\u5426\u4f7f\u7528\u4e86\u8fd9\u7c7b\u4ee3\u7801\uff0c\u90a3\u4e48\u60a8\u9700\u8981\u8bc4\u4f30\u5e94\u7528\u5e76\u91c7\u53d6\u63aa\u65bd\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_1\"><strong>\u5feb\u901f\u72b6\u6001\u68c0\u67e5<\/strong><\/h3>\n\n\n\n<p>\u8981\u68c0\u67e5\u5e94\u7528\u662f\u5426\u5df2\u6ee1\u8db3 64 \u4f4d\u8981\u6c42\uff0c\u8bf7\u5c06\u5e94\u7528\u5b89\u88c5\u5305\u4e0a\u4f20\u81f3\u5e94\u7528\u5b8c\u5584\u8d44\u6599\u9875\u7684\u5b89\u88c5\u5305\u4fe1\u606f\u6a21\u5757\u5904\uff0c\u82e5\u4e0a\u4f20\u6210\u529f\uff0c\u8bc1\u660e\u5b89\u88c5\u5305\u7b26\u5408\u8981\u6c42\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/09\/20220920022303732.png\" alt=\"\u4e0a\u4f20\u6587\u4ef6\" title=\"\u4e0a\u4f20\u6587\u4ef6\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_2\"><strong>\u60a8\u7684\u5e94\u7528\u662f\u5426\u4f7f\u7528\u4e86\u539f\u751f\u4ee3\u7801\uff1f<\/strong><\/h3>\n\n\n\n<p>\u9996\u5148\u9700\u8981\u68c0\u67e5\u60a8\u7684\u5e94\u7528\u662f\u5426\u4f7f\u7528\u4e86\u4efb\u4f55\u539f\u751f\u4ee3\u7801\u3002 \u5982\u679c\u60a8\u7684\u5e94\u7528\u7b26\u5408\u4ee5\u4e0b\u60c5\u51b5\uff0c\u4fbf\u662f\u4f7f\u7528\u4e86\u539f\u751f\u4ee3\u7801\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u4f7f\u7528\u4e86\u4efb\u4f55 C\/C++\uff08\u539f\u751f\uff09\u4ee3\u7801\u3002<\/li><li>\u4e0e\u4efb\u4f55\u7b2c\u4e09\u65b9\u539f\u751f\u5e93\u5173\u8054\u3002<\/li><li>\u901a\u8fc7\u4f7f\u7528\u539f\u751f\u5e93\u7684\u7b2c\u4e09\u65b9\u5e94\u7528\u6784\u5efa\u7a0b\u5e8f\u6784\u5efa\u800c\u6210\u3002<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_3\"><strong>\u5e94\u7528\u662f\u5426\u5305\u542b 64 \u4f4d\u5e93\uff1f<\/strong><\/h3>\n\n\n\n<p>\u82e5\u8981\u786e\u5b9a\u5e94\u7528\u662f\u5426\u5305\u542b 64 \u4f4d\u5e93\uff0c\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u68c0\u67e5 APK \u6587\u4ef6\u7684\u7ed3\u6784\u3002\u5728\u6784\u5efa\u65f6\uff0cAPK \u4f1a\u4e0e\u5e94\u7528\u6240\u9700\u7684\u6240\u6709\u539f\u751f\u5e93\u6253\u5305\u5728\u4e00\u8d77\u3002\u539f\u751f\u5e93\u4f1a\u6839\u636e&nbsp;<a href=\"https:\/\/developer.android.com\/ndk\/guides\/abis#sa\">ABI<\/a>&nbsp;\u5b58\u50a8\u5728\u4e0d\u540c\u7684\u6587\u4ef6\u5939\u4e2d\u3002\u60a8\u7684\u5e94\u7528\u4e0d\u4e00\u5b9a\u8981\u652f\u6301\u6240\u6709 64 \u4f4d\u67b6\u6784\uff0c\u4f46\u5bf9\u4e8e\u652f\u6301\u7684\u6bcf\u79cd\u539f\u751f 32 \u4f4d\u67b6\u6784\uff0c\u5e94\u7528\u90fd\u5fc5\u987b\u5305\u542b\u76f8\u5e94\u7684 64 \u4f4d\u67b6\u6784\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e ARM \u67b6\u6784\uff0c32 \u4f4d\u5e93\u4f4d\u4e8e&nbsp;<strong>armeabi-v7a<\/strong>&nbsp;\u4e2d\u3002 \u5bf9\u5e94\u7684 64 \u4f4d\u5e93\u5219\u4f4d\u4e8e&nbsp;<strong>arm64-v8a<\/strong>&nbsp;\u4e2d\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e x86 \u67b6\u6784\uff0c32 \u4f4d\u5e93\u4f4d\u4e8e&nbsp;<strong>x86<\/strong>&nbsp;\u4e2d\uff0c64 \u4f4d\u5e93\u5219\u4f4d\u4e8e&nbsp;<strong>x86_64<\/strong>&nbsp;\u4e2d\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u8981\u786e\u4fdd\u8fd9\u4e24\u4e2a\u6587\u4ef6\u5939\u4e2d\u90fd\u6709\u539f\u751f\u5e93\u3002\u603b\u7ed3\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\u5e73\u53f0<\/td><td>32 \u4f4d\u5e93\u6587\u4ef6\u5939<\/td><td>64 \u4f4d\u5e93\u6587\u4ef6\u5939<\/td><\/tr><tr><td>ARM<\/td><td>lib\/armeabi-v7a<\/td><td>lib\/arm64-v8a<\/td><\/tr><tr><td>x86<\/td><td>lib\/x86<\/td><td>lib\/x86_64<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u6bcf\u4e2a\u6587\u4ef6\u5939\u4e2d\u7684\u4e00\u5957\u5e93\u53ef\u80fd\u5b8c\u5168\u76f8\u540c\uff0c\u4e5f\u53ef\u80fd\u4e0d\u5b8c\u5168\u76f8\u540c\uff0c\u8fd9\u53d6\u51b3\u4e8e\u5e94\u7528\u7684\u5177\u4f53\u60c5\u51b5\u3002\u60a8\u5e94\u8fbe\u5230\u7684\u76ee\u6807\u662f\u786e\u4fdd\u60a8\u7684\u5e94\u7528\u80fd\u591f\u5728\u4ec5\u652f\u6301 64 \u4f4d\u67b6\u6784\u7684\u73af\u5883\u4e2d\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n\n\n\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u540c\u65f6\u9488\u5bf9 32 \u4f4d\u548c 64 \u4f4d\u67b6\u6784\u6784\u5efa\u7684 APK \u6216\u8f6f\u4ef6\u5305\u4f1a\u5177\u6709\u8fd9\u4e24\u79cd ABI \u7684\u6587\u4ef6\u5939\uff0c\u6bcf\u4e2a\u6587\u4ef6\u5939\u4e2d\u90fd\u6709\u4e00\u5957\u76f8\u5e94\u7684\u539f\u751f\u5e93\u3002\u5982\u679c\u60a8\u7684\u5e94\u7528\u4e0d\u652f\u6301 64 \u4f4d\u67b6\u6784\uff0c\u90a3\u4e48\u60a8\u5f88\u53ef\u80fd\u4f1a\u770b\u5230 32 \u4f4d ABI \u6587\u4ef6\u5939\uff0c\u4f46\u6ca1\u6709 64 \u4f4d\u6587\u4ef6\u5939\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_4\"><strong>\u4f7f\u7528 APK \u5206\u6790\u5668\u67e5\u627e\u539f\u751f\u5e93<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/developer.android.com\/studio\/build\/apk-analyzer\">APK \u5206\u6790\u5668<\/a>\u662f\u4e00\u6b3e\u53ef\u7528\u4e8e\u5bf9\u6784\u5efa\u7684 APK \u8fdb\u884c\u5404\u65b9\u9762\u8bc4\u4f30\u7684\u5de5\u5177\u3002\u9488\u5bf9\u6211\u4eec\u76ee\u524d\u6240\u8ba8\u8bba\u7684\u60c5\u51b5\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u8be5\u5de5\u5177\u67e5\u627e\u539f\u751f\u5e93\uff0c\u4ee5\u786e\u5b9a\u662f\u5426\u5177\u5907 64 \u4f4d\u5e93\u3002<\/p>\n\n\n\n<p>1.\u6253\u5f00 Android Studio\uff0c\u7136\u540e<strong>\u6253\u5f00\u4efb\u4e00\u9879\u76ee<\/strong>\u3002<\/p>\n\n\n\n<p>2.\u4ece\u83dc\u5355\u4e2d\u4f9d\u6b21\u9009\u62e9&nbsp;<strong>Build &gt; Analyze APK\u2026<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/09\/20220920022304647.png\" alt=\"\u4e0a\u4f20\u6587\u4ef6\" title=\"\u4e0a\u4f20\u6587\u4ef6\" \/><\/figure>\n\n\n\n<p>3.\u9009\u62e9\u60a8\u8981\u8bc4\u4f30\u7684 APK\u3002<\/p>\n\n\n\n<p>4.\u67e5\u770b&nbsp;<strong>lib<\/strong>&nbsp;\u6587\u4ef6\u5939\uff0c\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u627e\u5230\u201c.so\u201d\u6587\u4ef6\u3002\u5982\u679c\u5728\u60a8\u7684\u5e94\u7528\u4e2d\u627e\u4e0d\u5230\u4efb\u4f55\u201c.so\u201d\u6587\u4ef6\uff0c\u5219\u8bf4\u660e\u8be5\u5e94\u7528\u7684\u76f8\u5e94\u5e93\u5df2\u51c6\u5907\u5c31\u7eea\uff0c\u60a8\u65e0\u9700\u91c7\u53d6\u8fdb\u4e00\u6b65\u63aa\u65bd\u3002\u5982\u679c\u60a8\u770b\u5230&nbsp;<strong>armeabi-v7a<\/strong>&nbsp;\u6216&nbsp;<strong>x86<\/strong>\uff0c\u5219\u8bf4\u660e\u60a8\u6709 32 \u4f4d\u5e93\u3002<\/p>\n\n\n\n<p>5.\u68c0\u67e5\u662f\u5426&nbsp;<strong>arm64-v8a<\/strong>&nbsp;\u6216&nbsp;<strong>x86_64<\/strong>&nbsp;\u6587\u4ef6\u5939\u4e2d\u6709\u7c7b\u4f3c\u7684\u201c.so\u201d\u6587\u4ef6\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/09\/20220920022305847.png\" alt=\"\u4e0a\u4f20\u6587\u4ef6\" title=\"\u4e0a\u4f20\u6587\u4ef6\" \/><\/figure>\n\n\n\n<p>6.\u5982\u679c\u60a8\u6ca1\u6709\u4efb\u4f55&nbsp;<strong>arm64-v8a<\/strong>&nbsp;\u6216&nbsp;<strong>x86_64<\/strong>&nbsp;\u5e93\uff0c\u5219\u9700\u8981\u66f4\u65b0\u6784\u5efa\u6d41\u7a0b\u4ee5\u5f00\u59cb\u6784\u5efa\u5e76\u6253\u5305 APK \u4e2d\u7684\u8fd9\u4e9b\u5de5\u4ef6\u3002<\/p>\n\n\n\n<p>7.\u5982\u679c\u60a8\u770b\u5230 32 \u4f4d\u548c 64 \u4f4d\u7684\u5e93\u5747\u5df2\u6253\u5305\u5230\u8f6f\u4ef6\u5305\u4e2d\uff0c\u5219\u53ef\u4ee5\u8df3\u81f3<a href=\"https:\/\/developer.android.com\/distribute\/best-practices\/develop\/64-bit#test-64-bit-hardware\">\u5728 64 \u4f4d\u786c\u4ef6\u4e0a\u6d4b\u8bd5\u5e94\u7528<\/a>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_5\"><strong>\u901a\u8fc7\u89e3\u538b\u7f29 APK \u67e5\u627e\u539f\u751f\u5e93<\/strong><\/h3>\n\n\n\n<p>APK \u6587\u4ef6\u7684\u7ed3\u6784\u7c7b\u4f3c\u4e8e ZIP \u6587\u4ef6\uff0c\u53ef\u4ee5\u50cf ZIP \u6587\u4ef6\u4e00\u6837\u89e3\u538b\u7f29\u3002 \u5982\u679c\u60a8\u66f4\u559c\u6b22\u4f7f\u7528\u547d\u4ee4\u884c\u6216\u4efb\u4f55\u5176\u4ed6\u89e3\u538b\u7f29\u5de5\u5177\uff0c\u4e5f\u53ef\u4ee5\u91c7\u7528\u89e3\u538b\u7f29 APK \u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>\u53ea\u9700\u89e3\u538b\u7f29 APK \u6587\u4ef6\uff08\u6839\u636e\u60a8\u4f7f\u7528\u7684\u89e3\u538b\u7f29\u5de5\u5177\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5c06\u5176\u91cd\u547d\u540d\u4e3a .zip\uff09\uff0c\u7136\u540e\u6309\u7167\u4e0a\u6587\u4e2d\u7684\u6307\u5357\u6d4f\u89c8\u89e3\u538b\u7f29\u540e\u7684\u6587\u4ef6\uff0c\u5373\u53ef\u786e\u5b9a\u60a8\u7684\u5e94\u7528\u662f\u5426\u5df2\u7ecf\u4e3a\u652f\u6301 64 \u4f4d\u8bbe\u5907\u505a\u597d\u51c6\u5907\u4e86\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u4ece\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>:: Command Line\n&gt; zipinfo -1 YOUR_APK_FILE.apk | grep .so$\nlib\/armeabi-v7a\/libmain.so\nlib\/armeabi-v7a\/libmono.so\nlib\/armeabi-v7a\/libunity.so\nlib\/arm64-v8a\/libmain.so\nlib\/arm64-v8a\/libmono.so\nlib\/arm64-v8a\/libunity.so\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u6b64\u793a\u4f8b\u4e2d\u5b58\u5728armeabi-v7a\u5e93\u548carm64-v8a\u5e93\uff0c\u8fd9\u8868\u660e\u8be5\u5e94\u7528\u652f\u6301 64 \u4f4d\u67b6\u6784\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_6\"><strong>\u4f7f\u7528 64 \u4f4d\u5e93\u6784\u5efa\u5e94\u7528<\/strong><\/h2>\n\n\n\n<p>\u4e0b\u9762\u9488\u5bf9\u6784\u5efa 64 \u4f4d\u5e93\u505a\u51fa\u4e86\u76f8\u5173\u7684\u8bf4\u660e\u3002\u4e0d\u8fc7\uff0c\u9700\u8981\u6307\u51fa\u7684\u662f\uff0c\u4ee5\u4e0b\u5185\u5bb9\u4ec5\u4ecb\u7ecd\u4e86\u5982\u4f55\u6784\u5efa\u5728\u6e90\u4ee3\u7801\u7684\u57fa\u7840\u4e0a\u53ef\u6784\u5efa\u7684\u4ee3\u7801\u548c\u5e93\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u4efb\u4f55\u5916\u90e8 SDK \u6216\u5e93\uff0c\u8bf7\u786e\u4fdd\u6309\u7167<a href=\"https:\/\/developer.android.com\/distribute\/best-practices\/develop\/64-bit#assess-your-app\">\u4e0a\u6587\u6240\u8ff0\u7684\u6b65\u9aa4<\/a>\u4f7f\u7528 64 \u4f4d\u7248\u672c\u3002\u5982\u679c\u6ca1\u6709 64 \u4f4d\u7248\u672c\u53ef\u7528\uff0c\u8bf7\u4e0e\u76f8\u5e94 SDK \u6216\u5e93\u7684\u6240\u6709\u8005\u8054\u7cfb\uff0c\u5e76\u5728\u89c4\u5212\u652f\u6301 64 \u4f4d\u8bbe\u5907\u7684\u65b9\u6848\u65f6\u5c06\u8fd9\u4e00\u70b9\u8003\u8651\u5728\u5185\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_7\"><strong>\u4f7f\u7528 Android Studio \u6216 Gradle \u8fdb\u884c\u6784\u5efa<\/strong><\/h3>\n\n\n\n<p>\u5927\u591a\u6570 Android Studio \u9879\u76ee\u90fd\u4f7f\u7528 Gradle \u4f5c\u4e3a\u5e95\u5c42\u6784\u5efa\u7cfb\u7edf\uff0c\u56e0\u6b64\u672c\u90e8\u5206\u9002\u7528\u4e8e\u4f7f\u7528\u8fd9\u4e24\u79cd\u5de5\u5177\u8fdb\u884c\u6784\u5efa\u7684\u60c5\u51b5\u3002\u9488\u5bf9\u539f\u751f\u4ee3\u7801\u8fdb\u884c\u6784\u5efa\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u5c06&nbsp;<strong>arm64-v8a<\/strong>&nbsp;\u548c\/\u6216&nbsp;<strong>x86_64<\/strong>\uff08\u89c6\u60a8\u8981\u652f\u6301\u7684\u67b6\u6784\u800c\u5b9a\uff09\u6dfb\u52a0\u5230\u5e94\u7528\u7684\u201cbuild.gradle\u201d\u6587\u4ef6\u4e2d\u7684&nbsp;<a href=\"https:\/\/google.github.io\/android-gradle-dsl\/current\/com.android.build.gradle.internal.dsl.NdkOptions.html\">ndk.abiFilters<\/a>&nbsp;\u8bbe\u7f6e\u4e2d\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ Your app's build.gradle<\/em>\napply plugin: 'com.android.app'\n\nandroid {\n&nbsp; &nbsp;compileSdkVersion 27\n&nbsp; &nbsp;defaultConfig {\n&nbsp; &nbsp; &nbsp; &nbsp;appId \"com.google.example.64bit\"\n&nbsp; &nbsp; &nbsp; &nbsp;minSdkVersion 15\n&nbsp; &nbsp; &nbsp; &nbsp;targetSdkVersion 28\n&nbsp; &nbsp; &nbsp; &nbsp;versionCode 1\n&nbsp; &nbsp; &nbsp; &nbsp;versionName \"1.0\"\n&nbsp; &nbsp; &nbsp; &nbsp;ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'\n<em>\/\/ ...<\/em>\u590d\u5236<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_8\"><strong>\u4f7f\u7528 CMake \u8fdb\u884c\u6784\u5efa<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u5e94\u7528\u662f\u4f7f\u7528&nbsp;<a href=\"https:\/\/developer.android.com\/ndk\/guides\/cmake#options\">CMake<\/a>&nbsp;\u6784\u5efa\u7684\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u901a\u8fc7\u5c06&nbsp;<strong>arm64-v8a<\/strong>&nbsp;\u4f20\u9012\u5230\u201c-DANDROID_ABI\u201d\u53c2\u6570\u6765\u9488\u5bf9 64 \u4f4d ABI \u8fdb\u884c\u6784\u5efa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>:: Command Line\n&gt; cmake -DANDROID_ABI=arm64-v8a \u2026 or\n&gt; cmake -DANDROID_ABI=x86_64 \u2026\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u5728\u4f7f\u7528externalNativeBuild\u65f6\uff0c\u6b64\u65b9\u6cd5\u65e0\u6548\u3002\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.com\/distribute\/best-practices\/develop\/64-bit#building_with_android_studio_or_gradle\">\u4f7f\u7528 Gradle \u8fdb\u884c\u6784\u5efa<\/a>\u90e8\u5206\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_9\"><strong>\u4f7f\u7528 ndk-build \u8fdb\u884c\u6784\u5efa<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u5e94\u7528\u662f\u4f7f\u7528&nbsp;<a href=\"https:\/\/developer.android.com\/ndk\/guides\/ndk-build\">ndk-build<\/a>&nbsp;\u6784\u5efa\u7684\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u4f7f\u7528&nbsp;<code>APP_ABI<\/code>&nbsp;\u53d8\u91cf\u4fee\u6539\u201c<a href=\"https:\/\/developer.android.com\/ndk\/guides\/application_mk\">Application.mk<\/a>\u201d\u6587\u4ef6\uff0c\u4ece\u800c\u9488\u5bf9 64 \u4f4d ABI \u8fdb\u884c\u6784\u5efa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>APP_ABI := armeabi-v7a arm64-v8a x86 x86_64\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u5728\u4f7f\u7528externalNativeBuild\u65f6\uff0c\u6b64\u65b9\u6cd5\u65e0\u6548\u3002\u8bf7\u53c2\u9605<a href=\"https:\/\/developer.android.com\/distribute\/best-practices\/develop\/64-bit#building_with_android_studio_or_gradle\">\u4f7f\u7528 Gradle \u8fdb\u884c\u6784\u5efa<\/a>\u90e8\u5206\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_10\"><strong>\u5c06 32 \u4f4d\u4ee3\u7801\u79fb\u690d\u5230 64 \u4f4d\u67b6\u6784<\/strong><\/h3>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u4ee3\u7801\u5df2\u7ecf\u53ef\u4ee5\u5728\u684c\u9762\u6216 iOS \u5e73\u53f0\u4e0a\u8fd0\u884c\uff0c\u90a3\u4e48\u60a8\u65e0\u9700\u9488\u5bf9 Android \u505a\u989d\u5916\u7684\u5de5\u4f5c\u3002\u5982\u679c\u8fd9\u662f\u7b2c\u4e00\u6b21\u9488\u5bf9 64 \u4f4d\u7cfb\u7edf\u6784\u5efa\u60a8\u7684\u4ee3\u7801\uff0c\u90a3\u4e48\u60a8\u9700\u8981\u89e3\u51b3\u7684\u4e3b\u8981\u95ee\u9898\u662f\u6307\u9488\u4e0d\u518d\u9002\u5408&nbsp;<code>int<\/code>&nbsp;\u8fd9\u6837\u7684 32 \u4f4d\u6574\u6570\u7c7b\u578b\u3002\u60a8\u5c06\u9700\u8981\u66f4\u65b0\u4ee5&nbsp;<code>int<\/code>\u3001<code>unsigned<\/code>&nbsp;\u6216&nbsp;<code>uint32_t<\/code>&nbsp;\u7b49\u7c7b\u578b\u5b58\u50a8\u6307\u9488\u7684\u4ee3\u7801\u3002\u5728 Unix \u7cfb\u7edf\u4e0a\uff0c<code>long<\/code>&nbsp;\u5bf9\u5e94\u7684\u662f\u6307\u9488\u5927\u5c0f\uff0c\u4f46\u5728 Windows \u4e0a\u5e76\u975e\u5982\u6b64\uff0c\u56e0\u6b64\u60a8\u5e94\u8be5\u6539\u7528\u91ca\u610f\u7c7b\u578b&nbsp;<code>uintptr_t<\/code>&nbsp;\u6216&nbsp;<code>intptr_t<\/code>\u3002\u4f7f\u7528&nbsp;<code>ptrdiff_t<\/code>&nbsp;\u7c7b\u578b\u6765\u5b58\u50a8\u4e24\u4e2a\u6307\u9488\u4e4b\u95f4\u7684\u5dee\u5f02\u3002<\/p>\n\n\n\n<p>\u60a8\u5e94\u8be5\u59cb\u7ec8\u9009\u62e9\u4f7f\u7528&nbsp;<code><a href=\"https:\/\/en.cppreference.com\/w\/c\/types\/integer\">&lt;stdint.h&gt;<\/a><\/code>&nbsp;\u4e2d\u5b9a\u4e49\u7684\u7279\u5b9a\u56fa\u5b9a\u5bbd\u5ea6\u6574\u6570\u7c7b\u578b\uff0c\u800c\u4e0d\u662f&nbsp;<code>int<\/code>&nbsp;\u6216&nbsp;<code>long<\/code>&nbsp;\u7b49\u4f20\u7edf\u7c7b\u578b\uff0c\u5373\u4fbf\u5bf9\u4e8e\u975e\u6307\u9488\u4e5f\u5e94\u5982\u6b64\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u4ee5\u4e0b\u7f16\u8bd1\u5668\u6807\u8bb0\u6765\u6355\u6349\u4ee3\u7801\u5728\u6307\u9488\u548c\u6574\u6570\u4e4b\u95f4\u8f6c\u6362\u4e0d\u6b63\u786e\u7684\u60c5\u51b5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-Werror=pointer-to-int-cast\n-Werror=int-to-pointer-cast\n-Werror=shorten-64-to-32\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u5177\u6709int\u5b57\u6bb5\uff08\u5305\u542b\u6307\u5411 C\/C++ \u5bf9\u8c61\u7684\u6307\u9488\uff09\u7684 Java \u7c7b\u4e5f\u6709\u540c\u6837\u7684\u95ee\u9898\u3002\u5728 JNI \u6e90\u4ee3\u7801\u4e2d\u641c\u7d22jint\uff0c\u5e76\u786e\u4fdd\u5207\u6362\u5230long\uff08Java \u7aef\uff09\u548cjlong\uff08C++ \u7aef\uff09\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f\uff1a\u56e0\u6307\u9488\u88ab\u622a\u65ad\u800c\u5f15\u8d77\u7684\u5d29\u6e83\u5c06\u8868\u73b0\u4e3a SIGSEGV\uff0c\u5176\u4e2d\u9519\u8bef\u5730\u5740\u7684\u524d 32 \u4f4d\u5168\u90e8\u4e3a\u96f6\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e 64 \u4f4d\u4ee3\u7801\u800c\u8a00\uff0c\u9690\u5f0f\u51fd\u6570\u58f0\u660e\u7684\u5371\u9669\u6027\u8981\u9ad8\u5f97\u591a\u3002C\/C++ \u5047\u5b9a\u9690\u5f0f\u58f0\u660e\u7684\u51fd\u6570\uff08\u5373\u7f16\u8bd1\u5668\u672a\u68c0\u6d4b\u5230\u58f0\u660e\u7684\u51fd\u6570\uff09\u7684\u8fd4\u56de\u503c\u7c7b\u578b\u4e3aint\u3002\u5982\u679c\u51fd\u6570\u7684\u5b9e\u9645\u8fd4\u56de\u503c\u7c7b\u578b\u662f\u6307\u9488\uff0c\u90a3\u4e48\u5728 32 \u4f4d\u7cfb\u7edf\u4e0a\u662f\u53ef\u884c\u7684\uff0c\u56e0\u4e3a\u5728 32 \u4f4d\u7cfb\u7edf\u4e2d\u6307\u9488\u7684\u7c7b\u578b\u4e3aint\uff0c\u4f46\u5728 64 \u4f4d\u7cfb\u7edf\u4e2d\uff0c\u7f16\u8bd1\u5668\u4f1a\u4e22\u5f03\u6307\u9488\u7684\u524d\u534a\u90e8\u5206\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ This function returns a pointer:<\/em>\n<em>\/\/ extern char* foo();<\/em>\n\n<em>\/\/ If you don't include a header that declares it,<\/em>\n<em>\/\/ when the compiler sees this:<\/em>\nchar* result = foo();\n\n<em>\/\/ Instead of compiling that to:<\/em>\nresult = foo();\n\n<em>\/\/ It compiles to something equivalent to:<\/em>\nresult = foo() &amp; 0xffffffff;\n\n<em>\/\/ Which will then cause a SIGSEGV if you try to dereference `result`.<\/em>\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u7f16\u8bd1\u5668\u6807\u8bb0\u4f1a\u5c06\u9690\u5f0f\u51fd\u6570\u58f0\u660e\u8b66\u544a\u53d8\u6210\u9519\u8bef\uff0c\u4ee5\u4fbf\u60a8\u80fd\u591f\u66f4\u8f7b\u677e\u5730\u67e5\u627e\u548c\u89e3\u51b3\u6b64\u95ee\u9898\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-Werror=implicit-function-declaration\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u60a8\u6709\u5185\u8054\u6c47\u7f16\u7a0b\u5e8f\uff0c\u60a8\u9700\u8981\u91cd\u65b0\u7f16\u5199\u8be5\u7a0b\u5e8f\u6216\u4f7f\u7528\u666e\u901a\u7684 C\/C++ \u5b9e\u73b0\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u5bf9\u7c7b\u578b\u5927\u5c0f\u8fdb\u884c\u4e86\u786c\u7f16\u7801\uff08\u4f8b\u5982\uff0c8 \u6216 16 \u5b57\u8282\uff09\uff0c\u8bf7\u4f7f\u7528\u7b49\u6548\u7684&nbsp;sizeof(T)&nbsp;\u8868\u8fbe\u5f0f\uff08\u4f8b\u5982&nbsp;sizeof(void*)\uff09\u6765\u66ff\u6362\u5b83\u4eec\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u6709\u6761\u4ef6\u5730\u7f16\u8bd1\u4e0d\u540c\u4e8e 64 \u4f4d\u7684 32 \u4f4d\u4ee3\u7801\uff0c\u5219\u5bf9\u4e8e\u4e00\u822c\u6027\u7684 32\/64 \u5dee\u5f02\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528&nbsp;#if defined(__LP64__)\uff1b\u5bf9\u4e8e Android \u652f\u6301\u7684\u5177\u4f53\u67b6\u6784\uff0c\u53ef\u4ee5\u4f7f\u7528&nbsp;__arm__\u3001__aarch64__ (arm64)\u3001__i386__ (x86)&nbsp;\u548c __x86_64__\u3002<\/p>\n\n\n\n<p>\u60a8\u9700\u8981\u8c03\u6574\u7c7b\u4f3c&nbsp;printf&nbsp;\u6216&nbsp;scanf&nbsp;\u7684\u51fd\u6570\u7684\u683c\u5f0f\u5b57\u7b26\u4e32\uff0c\u56e0\u4e3a\u5982\u679c\u4f7f\u7528\u4f20\u7edf\u7684\u683c\u5f0f\u8bf4\u660e\u7b26\uff0c\u60a8\u65e0\u6cd5\u4ee5\u4e00\u79cd\u5bf9 32 \u4f4d\u548c 64 \u4f4d\u8bbe\u5907\u90fd\u6b63\u786e\u7684\u65b9\u5f0f\u6765\u6307\u5b9a 64 \u4f4d\u7c7b\u578b\u3002\u60a8\u53ef\u5229\u7528&nbsp;<a href=\"https:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/basedefs\/inttypes.h.html\">&lt;inttypes.h&gt;<\/a>&nbsp;\u4e2d\u7684PRI&nbsp;\u548c&nbsp;SCN&nbsp;\u5b8f\u6765\u89e3\u51b3\u6b64\u95ee\u9898\uff0cPRIxPTR&nbsp;\u548c&nbsp;SCNxPTR&nbsp;\u5206\u522b\u7528\u4e8e\u5199\u5165\/\u8bfb\u53d6\u5341\u516d\u8fdb\u5236\u6307\u9488\uff0cPRId64&nbsp;\u548c&nbsp;SCNd64&nbsp;\u5206\u522b\u7528\u4e8e\u4ee5\u53ef\u79fb\u690d\u7684\u65b9\u5f0f\u5199\u5165\/\u8bfb\u53d6 64 \u4f4d\u503c\u3002<\/p>\n\n\n\n<p>\u5728\u79fb\u4f4d\u65f6\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u4f7f\u7528&nbsp;1ULL&nbsp;\u6765\u83b7\u53d6\u8981\u79fb\u4f4d\u7684 64 \u4f4d\u5e38\u6570\uff0c\u800c\u4e0d\u80fd\u4f7f\u7528\u4ec5\u652f\u6301 32 \u4f4d\u7684 1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_11\"><strong>\u5229\u7528 Android App Bundle \u51cf\u5c11\u5927\u5c0f\u589e\u52a0\u91cf<\/strong><\/h3>\n\n\n\n<p>\u4e3a\u60a8\u7684\u5e94\u7528\u6dfb\u52a0 64 \u4f4d\u67b6\u6784\u652f\u6301\u53ef\u80fd\u4f1a\u5bfc\u81f4 APK \u7684\u5927\u5c0f\u589e\u52a0\u3002\u6211\u4eec\u5f3a\u70c8\u5efa\u8bae\u60a8\u5229\u7528&nbsp;<a href=\"https:\/\/developer.android.com\/platform\/technology\/app-bundle\">Android APP Bundle<\/a>&nbsp;\u529f\u80fd\uff0c\u4ee5\u5c3d\u91cf\u51cf\u5c0f\u56e0\u5728\u540c\u4e00 APK \u4e2d\u540c\u65f6\u5305\u542b 32 \u4f4d\u548c 64 \u4f4d\u539f\u751f\u4ee3\u7801\u800c\u5bf9 APK \u5927\u5c0f\u4ea7\u751f\u7684\u5f71\u54cd\u3002<\/p>\n\n\n\n<p>\u5b9e\u9645\u4e0a\uff0c\u5c06\u5e94\u7528\u6539\u4e3a\u4f7f\u7528 Android App Bundle \u53ef\u4ee5\u7f29\u51cf APK \u7684\u5927\u5c0f\uff0c\u4f7f\u5176\u6bd4\u73b0\u5728\u66f4\u5c0f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_12\"><strong>\u6e38\u620f\u5f00\u53d1\u8005<\/strong><\/h3>\n\n\n\n<p>\u6211\u4eec\u77e5\u9053\uff0c\u8fc1\u79fb\u7b2c\u4e09\u65b9\u6e38\u620f\u5f15\u64ce\u662f\u4e00\u4e2a\u8017\u8d39\u4eba\u529b\u7684\u8fc7\u7a0b\uff0c\u5e76\u4e14\u9700\u8981\u5f88\u957f\u7684\u51c6\u5907\u65f6\u95f4\u3002\u5e86\u5e78\u7684\u662f\uff0c\u4e09\u5927\u6700\u5e38\u7528\u7684\u5f15\u64ce\u76ee\u524d\u90fd\u652f\u6301 64 \u4f4d\u67b6\u6784\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Unreal\uff08\u81ea 2015 \u5e74\u8d77\uff09<\/li><li>Cocos2d\uff08\u81ea 2015 \u5e74\u8d77\uff09<\/li><li>Unity\uff08\u81ea 2018 \u5e74\u8d77\uff09<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_13\"><strong>Unity \u5f00\u53d1\u8005<\/strong><\/h3>\n\n\n\n<p>\u5347\u7ea7\u5230\u652f\u6301\u7684\u7248\u672c<\/p>\n\n\n\n<p>Unity \u81ea\u7248\u672c&nbsp;<a href=\"https:\/\/blogs.unity3d.com\/2018\/07\/10\/2018-2-is-now-available\/\">2018.2<\/a>&nbsp;\u548c&nbsp;<a href=\"https:\/\/unity3d.com\/unity\/whatsnew\/unity-2017.4.16\">2017.4.16<\/a>&nbsp;\u5f00\u59cb\u63d0\u4f9b 64 \u4f4d\u652f\u6301\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u53d1\u73b0\u81ea\u5df1\u4f7f\u7528\u7684 Unity \u7248\u672c\u4e0d\u652f\u6301 64 \u4f4d\u67b6\u6784\uff0c\u8bf7\u786e\u5b9a\u8981\u5347\u7ea7\u5230\u7684\u7248\u672c\uff0c\u5e76\u6309\u7167 Unity \u63d0\u4f9b\u7684<a href=\"https:\/\/docs.unity3d.com\/Manual\/UpgradeGuides.html\">\u6307\u5357<\/a>\u8fc1\u79fb\u60a8\u7684\u73af\u5883\uff0c\u786e\u4fdd\u5c06\u60a8\u7684\u5e94\u7528\u5347\u7ea7\u5230\u53ef\u6784\u5efa 64 \u4f4d\u5e93\u7684\u7248\u672c\u3002Unity \u5efa\u8bae\u60a8<a href=\"https:\/\/blogs.unity3d.com\/2018\/04\/09\/new-plans-for-unity-releases-introducing-the-tech-and-long-term-support-lts-streams\/\">\u5347\u7ea7\u5230\u8be5\u7f16\u8f91\u5668\u7684\u6700\u65b0 LTS \u7248\u672c<\/a>\uff0c\u4ee5\u83b7\u53d6\u6700\u65b0\u7684\u529f\u80fd\u548c\u66f4\u65b0\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u7684\u56fe\u8868\u6982\u8ff0\u4e86 Unity \u7684\u5404\u4e2a\u7248\u672c\u4ee5\u53ca\u60a8\u5e94\u8be5\u91c7\u53d6\u7684\u63aa\u65bd\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/09\/20220920022305935.png\" alt=\"\u4e0a\u4f20\u6587\u4ef6\" title=\"\u4e0a\u4f20\u6587\u4ef6\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"change-build-settings\"><\/h4>\n\n\n\n<p>\u66f4\u6539\u6784\u5efa\u8bbe\u7f6e\u4ee5\u8f93\u51fa 64 \u4f4d\u5e93<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u7684 Unity \u7248\u672c\u652f\u6301 64 \u4f4d\u7684 Android \u5e93\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u6784\u5efa\u8bbe\u7f6e\u6765\u751f\u6210 64 \u4f4d\u7248\u672c\u7684\u5e94\u7528\u3002\u60a8\u8fd8\u9700\u8981\u4f7f\u7528 IL2CPP \u540e\u7aef\u4f5c\u4e3a Scripting Backend\uff08\u8be6\u89c1<a href=\"https:\/\/blogs.unity3d.com\/2017\/12\/20\/meeting-google-play-requirements-in-the-future\/\">\u6b64\u5904<\/a>\uff09\u3002\u8981\u4e3a\u6784\u5efa 64 \u4f4d\u67b6\u6784\u800c\u8bbe\u7f6e Unity \u9879\u76ee\uff0c\u8bf7\u6309\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<p>1.\u8f6c\u5230 Build Settings\uff0c\u7136\u540e\u786e\u8ba4 Unity \u6807\u5fd7\u662f\u5426\u663e\u793a\u5728 Platform \u4e0b\u7684 Android \u65c1\u8fb9\uff0c\u4ee5\u786e\u4fdd\u60a8\u662f\u5728\u9488\u5bf9 Android \u8fdb\u884c\u6784\u5efa\u3002<\/p>\n\n\n\n<p>a.\u5982\u679c Unity \u6807\u5fd7\u672a\u663e\u793a\u5728 Android \u5e73\u53f0\u65c1\u8fb9\uff0c\u8bf7\u9009\u62e9 Android\uff0c\u7136\u540e\u70b9\u51fb Switch Platform\u3002<\/p>\n\n\n\n<p>2.\u70b9\u51fb Player Settings\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/09\/20220920022306387.png\" alt=\"\u4e0a\u4f20\u6587\u4ef6\" title=\"\u4e0a\u4f20\u6587\u4ef6\" \/><\/figure>\n\n\n\n<p>3.\u4f9d\u6b21\u8f6c\u5230&nbsp;<strong>Player Settings Panel &gt; Settings for Android &gt; Other Settings &gt; Configuration<\/strong><\/p>\n\n\n\n<p>4.\u5c06&nbsp;<strong>Scripting Backend<\/strong>&nbsp;\u8bbe\u4e3a&nbsp;<strong>IL2CPP<\/strong>\u3002<\/p>\n\n\n\n<p>5.\u4f9d\u6b21\u9009\u62e9&nbsp;<strong>Target Architecture &gt; ARM64<\/strong>&nbsp;\u590d\u9009\u6846\u3002<\/p>\n\n\n\n<p>6.\u7167\u5e38\u6784\u5efa\uff01<\/p>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u9488\u5bf9 ARM64 \u8fdb\u884c\u6784\u5efa\u9700\u8981\u60a8\u4e13\u95e8\u9488\u5bf9\u8be5\u5e73\u53f0\u6784\u5efa\u60a8\u7684\u6240\u6709\u8d44\u4ea7\u3002\u8bf7\u6309\u7167 Unity \u7684<a href=\"https:\/\/docs.unity3d.com\/Manual\/ReducingFilesize.html\">\u6307\u5357<\/a>\u6765\u7f29\u51cf APK \u5927\u5c0f\uff0c\u540c\u65f6\u8003\u8651\u5229\u7528<a href=\"https:\/\/developer.android.com\/platform\/technology\/app-bundle\">Android App Bundle<\/a>\u529f\u80fd\u6765\u51cf\u5c0f\u5927\u5c0f\u589e\u52a0\u91cf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_14\"><strong>RenderScript \u548c 64 \u4f4d\u5408\u89c4\u6027<\/strong><\/h2>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u5e94\u7528\u4f7f\u7528 RenderScript \u5e76\u4e14\u662f\u901a\u8fc7\u8f83\u4f4e\u7248\u672c\u7684 Android \u5de5\u5177\u6784\u5efa\u7684\uff0c\u8be5\u5e94\u7528\u53ef\u80fd\u4f1a\u5b58\u5728 64 \u4f4d\u5408\u89c4\u6027\u95ee\u9898\u3002\u4f7f\u7528\u7248\u672c\u4f4e\u4e8e 21.0.0 \u7684\u6784\u5efa\u5de5\u5177\u65f6\uff0c\u7f16\u8bd1\u5668\u53ef\u80fd\u4f1a\u5c06\u751f\u6210\u7684\u4f4d\u7801\u653e\u5230\u5916\u90e8&nbsp;<code>.bc<\/code>&nbsp;\u6587\u4ef6\u4e2d\u300264 \u4f4d\u67b6\u6784\u4e0d\u518d\u652f\u6301\u8fd9\u4e9b\u65e7\u7684&nbsp;<code>.bc<\/code>&nbsp;\u6587\u4ef6\uff0c\u56e0\u6b64\uff0c\u5982\u679c\u60a8\u7684 APK \u4e2d\u6709\u8fd9\u7c7b\u6587\u4ef6\uff0c\u5c31\u4f1a\u9020\u6210\u5408\u89c4\u6027\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u8bf7\u79fb\u9664\u9879\u76ee\u4e2d\u7684\u6240\u6709&nbsp;<code>.bc<\/code>&nbsp;\u6587\u4ef6\uff0c\u5c06\u73af\u5883\u5347\u7ea7\u5230&nbsp;<code>build-tools-21.0.0<\/code>&nbsp;\u6216\u66f4\u9ad8\u7248\u672c\uff0c\u5e76\u5c06 Android Studio \u4e2d\u7684&nbsp;<code><a href=\"https:\/\/developer.android.com\/guide\/topics\/renderscript\/compute\">renderscriptTargetApi<\/a><\/code>&nbsp;\u8bbe\u4e3a 21+\uff0c\u4ee5\u6307\u793a\u7f16\u8bd1\u5668\u4e0d\u8981\u751f\u6210&nbsp;<code>.bc<\/code>&nbsp;\u6587\u4ef6\u3002\u7136\u540e\uff0c\u91cd\u65b0\u6784\u5efa\u60a8\u7684\u5e94\u7528\uff0c\u68c0\u67e5\u662f\u5426\u6709&nbsp;<code>.bc<\/code>&nbsp;\u6587\u4ef6\uff0c\u518d\u5c06\u5e94\u7528\u4e0a\u4f20\u5230 \u5c0f\u7c73\u5e94\u7528\u5546\u5e97\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_15\"><strong>\u5728 64 \u4f4d\u786c\u4ef6\u4e0a\u6d4b\u8bd5\u5e94\u7528<\/strong><\/h2>\n\n\n\n<p>64 \u4f4d\u7248\u672c\u7684\u5e94\u7528\u5e94\u63d0\u4f9b\u4e0e 32 \u4f4d\u7248\u672c\u76f8\u540c\u7684\u8d28\u91cf\u548c\u529f\u80fd\u96c6\u3002\u8bf7\u5bf9\u60a8\u7684\u5e94\u7528\u8fdb\u884c\u6d4b\u8bd5\uff0c\u4ee5\u786e\u4fdd\u4f7f\u7528\u6700\u65b0\u7684 64 \u4f4d\u8bbe\u5907\u7684\u7528\u6237\u80fd\u591f\u5728\u60a8\u7684\u5e94\u7528\u4e2d\u83b7\u5f97\u4f18\u8d28\u7684\u4f53\u9a8c\u3002<\/p>\n\n\n\n<p>\u8981\u5f00\u59cb\u6d4b\u8bd5\u60a8\u7684\u5e94\u7528\uff0c\u60a8\u8981\u6709\u652f\u6301 64 \u4f4d\u67b6\u6784\u7684\u8bbe\u5907\u3002\u65f6\u4e0b\u6709\u5f88\u591a\u652f\u6301 64 \u4f4d\u67b6\u6784\u7684\u70ed\u95e8\u8bbe\u5907\uff0c\u4f8b\u5982 Google \u7684 Pixel \u4ee5\u53ca\u5176\u4ed6\u65d7\u8230\u8bbe\u5907\u3002<\/p>\n\n\n\n<p>\u6700\u7b80\u5355\u7684 APK \u6d4b\u8bd5\u65b9\u6cd5\u5c31\u662f\u4f7f\u7528 adb \u5b89\u88c5\u8be5\u5e94\u7528\u3002\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u4ee5\u63d0\u4f9b&nbsp;<code>--abi<\/code>&nbsp;\u4f5c\u4e3a\u53c2\u6570\uff0c\u7528\u4ee5\u6307\u793a\u8981\u5c06\u54ea\u4e9b\u5e93\u5b89\u88c5\u5230\u8bbe\u5907\u4e0a\u3002\u8fd9\u6837\u5728\u8bbe\u5907\u4e0a\u5b89\u88c5\u8be5\u5e94\u7528\u65f6\u4fbf\u4f1a\u4ec5\u5305\u542b 64 \u4f4d\u5e93\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>:: Command Line\n# A successful install:\n&gt; adb install --abi armeabi-v7a YOUR_APK_FILE.apk\nSuccess\n\n# If your APK does not have the 64-bit libraries:\n&gt; adb install --abi arm64-v8a YOUR_APK_FILE.apk\nadb: failed to install YOUR_APK_FILE.apk: Failure &#091;INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]\n\n# If your device does not support 64-bit, an emulator, for example:\n&gt; adb install --abi arm64-v8a YOUR_APK_FILE.apk\nABI arm64-v8a not supported on this device\u590d\u5236<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5\u6210\u529f\u540e\uff0c\u8bf7\u7167\u5e38\u5bf9\u5e94\u7528\u8fdb\u884c\u6d4b\u8bd5\uff0c\u4ee5\u786e\u4fdd\u5176\u8d28\u91cf\u4e0e 32 \u4f4d\u7248\u672c\u76f8\u540c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_16\"><strong>\u53d1\u5e03<\/strong><\/h2>\n\n\n\n<p>\u5982\u679c\u60a8\u89c9\u5f97\u5e94\u7528\u5df2\u51c6\u5907\u59a5\u5f53\uff0c\u8bf7\u7167\u5e38\u53d1\u5e03\u3002\u4e0e\u5f80\u5e38\u4e00\u6837\uff0c\u8bf7\u7ee7\u7eed\u9075\u5faa\u90e8\u7f72\u5e94\u7528\u7684\u6700\u4f73\u505a\u6cd5\u3002\u6211\u4eec\u5efa\u8bae\u5229\u7528<a href=\"https:\/\/support.google.com\/googleplay\/android-developer\/answer\/3131213?hl=zh-CN\">\u5c01\u95ed\u5f0f\u6d4b\u8bd5\u8f68\u9053<\/a>\u5411\u6709\u9650\u6570\u91cf\u7684\u7528\u6237\u53d1\u5e03\u5e94\u7528\uff0c\u4ee5\u786e\u4fdd\u5e94\u7528\u7684\u8d28\u91cf\u4e00\u81f4\u3002<\/p>\n\n\n\n<p>\u5728\u53d1\u5e03\u91cd\u5927\u66f4\u65b0\u65f6\uff0c\u4e5f\u52a1\u5fc5\u8981\u5148\u5728\u652f\u6301 64 \u4f4d\u7684\u8bbe\u5907\u4e0a\u8fdb\u884c\u5168\u9762\u6d4b\u8bd5\uff0c\u7136\u540e\u518d\u9762\u5411\u66f4\u5e7f\u6cdb\u7684\u53d7\u4f17\u7fa4\u4f53\u53d1\u5e03\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>4 \u4f4d CPU \u80fd\u591f\u4e3a\u60a8\u7684\u7528\u6237\u63d0\u4f9b\u66f4\u5feb\u3001\u66f4\u4e30\u5bcc\u7684\u4f53\u9a8c\u3002\u6dfb\u52a0 64 \u4f4d\u7684\u5e94\u7528\u7248\u672c\u4e0d\u4ec5\u53ef\u4ee5\u63d0\u5347\u6027\u80fd\u3001\u4e3a\u672a\u6765\u521b\u65b0\u521b\u9020\u6761\u4ef6\uff0c\u8fd8\u80fd\u9488\u5bf9\u4ec5\u652f\u6301 64 \u4f4d\u67b6\u6784\u7684\u8bbe\u5907\u505a\u597d\u51c6\u5907\u3002 \u672c\u6307\u5357\u4ecb\u7ecd\u4e86\u5982\u4f55\u786e&#8230;<\/p>\n","protected":false},"author":4,"featured_media":7959,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[2664],"special":[],"attr":[],"class_list":["post-7958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-appjc","tag-2664","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/7958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=7958"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/7958\/revisions"}],"predecessor-version":[{"id":7964,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/7958\/revisions\/7964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media\/7959"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=7958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=7958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=7958"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=7958"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=7958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}