{"id":11474,"date":"2022-11-21T16:10:03","date_gmt":"2022-11-21T08:10:03","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/?p=11474"},"modified":"2022-11-21T16:10:33","modified_gmt":"2022-11-21T08:10:33","slug":"%e5%ae%89%e5%8d%9364%e4%bd%8d%e5%ba%94%e7%94%a8%e9%80%82%e9%85%8d%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/11474\/","title":{"rendered":"\u5b89\u535364\u4f4d\u5e94\u7528\u9002\u914d\u6307\u5357"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5e94\u7528<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/64%e4%bd%8d%e9%80%82%e9%85%8d\/\" title=\"64\u4f4d\u9002\u914d\" target=\"_blank\">64\u4f4d\u9002\u914d<\/a><\/span><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>1.1 \u786e\u5b9a\u60a8\u7684\u5e94\u7528\u662f\u5426\u9700\u8981\u9002\u914d<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/64%e4%bd%8d\/\" title=\"64\u4f4d\" target=\"_blank\">64\u4f4d<\/a><\/span><\/h2>\n\n\n\n<p>\u4f7f\u7528\u4e86\u539f\u751f\u4ee3\u7801\u7684\u5e94\u7528\u624d\u9700\u8981\u8fdb\u884c64\u4f4d\u9002\u914d\u3002<\/p>\n\n\n\n<p><strong>1.1.1 64\u4f4d\u5e94\u7528\u7684\u7279\u5f81<\/strong><\/p>\n\n\n\n<p>64\u4f4d\u5e94\u7528\u5fc5\u987b\u5305\u542b64\u4f4d\u5e93\u3002\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u68c0\u67e5APK\u6587\u4ef6\u7684\u7ed3\u6784\uff0c\u5e93\u6587\u4ef6\u4f1a\u88ab\u6253\u5305\u5728APK\uff0c\u9488\u5bf9<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/arm\/\" title=\"ARM\" target=\"_blank\">ARM<\/a><\/span>\u67b6\u6784\u548c<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/x86\/\" title=\"x86\" target=\"_blank\">x86<\/a><\/span>\u67b6\u6784\u5177\u4f53\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>\u5e73\u53f0<\/strong><strong><\/strong><\/td><td><strong>32\u4f4d\u5e93\u6587\u4ef6\u5939<\/strong><strong><\/strong><\/td><td><strong>64\u4f4d\u5e93\u6587\u4ef6\u5939<\/strong><strong><\/strong><\/td><\/tr><tr><td>ARM<\/td><td>lib\/armeabi\u6216\u8005lib\/<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/armeabi-v7a\/\" title=\"armeabi-v7a\" target=\"_blank\">armeabi-v7a<\/a><\/span><\/td><td>lib\/arm64-v8a<\/td><\/tr><tr><td>x86<\/td><td>lib\/x86<\/td><td>lib\/<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/x86_64\/\" title=\"x86_64\" target=\"_blank\">x86_64<\/a><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u9488\u5bf9ARM\u67b6\u6784\uff0cAPK\u4e2d\u5e93\u6587\u4ef6\u88ab\u6253\u5305\u5728lib\/arm64-v8a\u4e0b\u9762\u7684\u5e94\u7528\u662f64\u4f4d\u5e94\u7528\u3002<\/p>\n\n\n\n<p><strong>1.1.2 \u786e\u5b9a\u60a8\u7684\u5e94\u7528\u662f\u5426\u4f7f\u7528\u4e86\u539f\u751f\u4ee3\u7801&nbsp;<\/strong><\/p>\n\n\n\n<p>\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\/<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/c\/\" title=\"C++\" target=\"_blank\">C++<\/a><\/span>\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<h2 class=\"wp-block-heading\"><a><\/a>1.2 \u68c0\u9a8c\u60a8\u7684\u5e94\u7528\u662f\u5426\u5df2\u7ecf\u652f\u630164\u4f4d&nbsp;<\/h2>\n\n\n\n<p><strong>1.2.1 \u5229\u7528\u8c37\u6b4c\u5546\u5e97\u5feb\u901f\u68c0\u67e5\u60a8\u7684\u5e94\u7528\u662f\u5426\u652f\u630164\u4f4d<\/strong><\/p>\n\n\n\n<p>\u8981\u68c0\u67e5\u5e94\u7528\u662f\u5426\u5df2\u6ee1\u8db3 64 \u4f4d\u8981\u6c42\uff0c\u4e00\u79cd\u5feb\u901f\u7684\u65b9\u6cd5\u662f\u524d\u5f80 Play \u7ba1\u7406\u4e2d\u5fc3\u67e5\u770b\u73b0\u6709\u7684\u7248\u672c\uff0c\u786e\u5b9a\u5e94\u7528\u662f\u5426\u5408\u89c4<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121161003935.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u8349\u7a3f\u7248\u672c\u5b58\u5728\u4e0e 64 \u4f4d\u8981\u6c42\u76f8\u5173\u7684\u95ee\u9898\uff0cPlay \u7ba1\u7406\u4e2d\u5fc3\u4e5f\u4f1a\u663e\u793a\u76f8\u5e94\u7684\u8b66\u544a\u3002\u8bf7\u770b\u4ee5\u4e0b\u793a\u4f8b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121161006530.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>\u5982\u679c\u60a8\u770b\u5230\u63d0\u9192\uff0c\u8868\u660e\u60a8\u7684\u5e94\u7528\u662f\u4e0d\u652f\u630164\u4f4d\u7684\uff0c\u9700\u8981\u8fdb\u884c\u76f8\u5e94\u7684\u9002\u914d\u3002<\/p>\n\n\n\n<p><strong>1.2.2 \u4f7f\u7528APK\u5206\u6790\u5668\u67e5\u627e\u539f\u751f\u5e93<\/strong><\/p>\n\n\n\n<p>APK\u5206\u6790\u5668\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 <span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/android-studio\/\" title=\"Android Studio\" target=\"_blank\">Android Studio<\/a><\/span>\uff0c\u7136\u540e\u6253\u5f00\u4efb\u4e00\u9879\u76ee\u3002<\/p>\n\n\n\n<p>2. \u4ece\u83dc\u5355\u4e2d\u4f9d\u6b21\u9009\u62e9 <span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/build\/\" title=\"Build\" target=\"_blank\">Build<\/a><\/span> &gt; <span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/analyze-apk\/\" title=\"Analyze APK\" target=\"_blank\">Analyze APK<\/a><\/span>\u2026<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121161011762.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>3. \u9009\u62e9\u60a8\u8981\u8bc4\u4f30\u7684APK\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\/11\/20221121161012484.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>6. \u5982\u679c\u60a8\u6ca1\u6709\u4efb\u4f55 arm64-v8a \u6216 x86_64 \u5e93\uff0c\u5219\u9700\u8981\u66f4\u65b0\u6784\u5efa\u6d41\u7a0b\u4ee5\u5f00\u59cb\u6784\u5efa\u5e76\u6253\u5305APK\u4e2d\u7684\u8fd9\u4e9b\u5de5\u4ef6\u3002<\/p>\n\n\n\n<p>7. \u5982\u679c\u60a8\u770b\u523032\u4f4d\u548c64\u4f4d\u7684\u5e93\u5747\u5df2\u6253\u5305\u5230\u8f6f\u4ef6\u5305\u4e2d\uff0c\u5219\u53ef\u4ee5\u8df3\u81f3\u572864\u4f4d\u786c\u4ef6\u4e0a\u6d4b\u8bd5\u5e94\u7528\u3002<\/p>\n\n\n\n<p><strong>1.2.3 \u901a\u8fc7\u89e3\u538b\u7f29 APK \u67e5\u627e\u539f\u751f\u5e93<\/strong><\/p>\n\n\n\n<p>APK\u6587\u4ef6\u7684\u7ed3\u6784\u7c7b\u4f3c\u4e8eZIP\u6587\u4ef6\uff0c\u53ef\u4ee5\u50cfZIP\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\u7f29APK\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>\u53ea\u9700\u89e3\u538b\u7f29APK\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\u630164\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-preformatted\">&gt;&nbsp;zipinfo&nbsp;-1&nbsp;YOUR_APK_FILE.apk&nbsp;|&nbsp;grep&nbsp;.so$<br>lib\/armeabi-v7a\/libmain.so<br>lib\/armeabi-v7a\/libmono.so<br>lib\/armeabi-v7a\/libunity.so<br>lib\/arm64-v8a\/libmain.so<br>lib\/arm64-v8a\/libmono.so<br>lib\/arm64-v8a\/libunity.so<\/pre>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u6b64\u793a\u4f8b\u4e2d\u5b58\u5728 armeabi-v7a \u5e93\u548c arm64-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\"><a><\/a>1.3 \u5982\u4f55\u4f7f\u752864\u4f4d\u5e93\u6784\u5efa\u5e94\u7528<\/h2>\n\n\n\n<p><strong>1.3.1 \u4f7f\u7528Android Studio\u6216Gradle \u8fdb\u884c\u6784\u5efa<\/strong><\/p>\n\n\n\n<p>\u5927\u591a\u6570Android Studio\u9879\u76ee\u90fd\u4f7f\u7528Gradle\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\u5c06arm64-v8a \u548c\/\u6216 x86_64\uff08\u89c6\u60a8\u8981\u652f\u6301\u7684\u67b6\u6784\u800c\u5b9a\uff09\u6dfb\u52a0\u5230\u5e94\u7528<\/p>\n\n\n\n<p>\u201cbuild.gradle\u201d\u6587\u4ef6\u4e2d\u7684 ndk.abiFilters \u8bbe\u7f6e\u4e2d\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Your app's build.gradle<br>apply plugin: 'com.android.app'<br><br>android {<br> &nbsp; compileSdkVersion 27<br> &nbsp; defaultConfig {<br> &nbsp; &nbsp; &nbsp; appId \"com.google.example.64bit\"<br> &nbsp; &nbsp; &nbsp; minSdkVersion 15<br> &nbsp; &nbsp; &nbsp; targetSdkVersion 28<br> &nbsp; &nbsp; &nbsp; versionCode 1<br> &nbsp; &nbsp; &nbsp; versionName \"1.0\"<br> &nbsp; &nbsp; &nbsp; ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'<br>\/\/ ...<\/pre>\n\n\n\n<p><strong>1.3.2 \u4f7f\u7528CMake\u8fdb\u884c\u6784\u5efa<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u5e94\u7528\u662f\u4f7f\u7528CMake\u6784\u5efa\u7684\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u901a\u8fc7\u5c06 arm64-v8a \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-preformatted\"> &nbsp; &nbsp;&gt; cmake -DANDROID_ABI=arm64-v8a \u2026 or<br> &nbsp; &nbsp;&gt; cmake -DANDROID_ABI=x86_64 \u2026<\/pre>\n\n\n\n<p>&nbsp; &nbsp; \u5728\u4f7f\u7528externalNativeBuild \u65f6\uff0c\u6b64\u65b9\u6cd5\u65e0\u6548\u3002\u8bf7\u53c2\u9605\u4f7f\u7528Gradle\u8fdb\u884c\u6784\u5efa\u90e8\u5206\u3002<\/p>\n\n\n\n<p><strong>1.3.3 \u4f7f\u7528ndk-build \u8fdb\u884c\u6784\u5efa<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u5e94\u7528\u662f\u4f7f\u7528 ndk-build \u6784\u5efa\u7684\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u4f7f\u7528 APP_ABI \u53d8\u91cf\u4fee\u6539\u201cApplication.mk\u201d\u6587\u4ef6\uff0c\u4ece\u800c\u9488\u5bf9 64 \u4f4d ABI \u8fdb\u884c\u6784\u5efa\uff1a<\/p>\n\n\n\n<p>&nbsp; &nbsp; APP_ABI := armeabi-v7a arm64-v8a x86 x86_64<\/p>\n\n\n\n<p>\u5728\u4f7f\u7528 externalNativeBuild \u65f6\uff0c\u6b64\u65b9\u6cd5\u65e0\u6548\u3002\u8bf7\u53c2\u9605\u4f7f\u7528 Gradle \u8fdb\u884c\u6784\u5efa\u90e8\u5206\u3002<\/p>\n\n\n\n<p><strong>1.3.4 \u5c0632\u4f4d\u4ee3\u7801\u79fb\u690d\u5230 64 \u4f4d\u67b6\u6784<\/strong><\/p>\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 int \u8fd9\u6837\u7684 32 \u4f4d\u6574\u6570\u7c7b\u578b\u3002\u60a8\u5c06\u9700\u8981\u66f4\u65b0\u4ee5 int\u3001unsigned \u6216 uint32_t \u7b49\u7c7b\u578b\u5b58\u50a8\u6307\u9488\u7684\u4ee3\u7801\u3002\u5728 Unix \u7cfb\u7edf\u4e0a\uff0clong \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 uintptr_t \u6216 intptr_t\u3002\u4f7f\u7528 ptrdiff_t \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 &lt;stdint.h&gt; \u4e2d\u5b9a\u4e49\u7684\u7279\u5b9a\u56fa\u5b9a\u5bbd\u5ea6\u6574\u6570\u7c7b\u578b\uff0c\u800c\u4e0d\u662f int \u6216 long \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-preformatted\"> &nbsp; &nbsp;-Werror=pointer-to-int-cast<br> &nbsp; &nbsp;-Werror=int-to-pointer-cast<br> &nbsp; &nbsp;-Werror=shorten-64-to-32\u3001<\/pre>\n\n\n\n<p>\u5177\u6709 int \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\u7d22 jint\uff0c\u5e76\u786e\u4fdd\u5207\u6362\u5230 long\uff08Java \u7aef\uff09\u548c jlong\uff08C++ \u7aef\uff09\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\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\u4e3a int\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\u4e3a int\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-preformatted\">\/\/ This function returns a pointer:<br>\/\/ extern char* foo();<br><br>\/\/ If you don't include a header that declares it,<br>\/\/ when the compiler sees this:<br>char* result = foo();<br><br>\/\/ Instead of compiling that to:<br>result = foo();<br><br>\/\/ It compiles to something equivalent to:<br>result = foo() &amp; 0xffffffff;<br><br>\/\/ Which will then cause a SIGSEGV if you try to dereference `result`.<\/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-Werror=implicit-function-declaration<\/p>\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 sizeof(T) \u8868\u8fbe\u5f0f\uff08\u4f8b\u5982 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 #if defined(__LP64__)\uff1b\u5bf9\u4e8e Android \u652f\u6301\u7684\u5177\u4f53\u67b6\u6784\uff0c\u53ef\u4ee5\u4f7f\u7528 __arm__\u3001__aarch64__ (arm64)\u3001__i386__ (x86) \u548c __x86_64__\u3002<\/p>\n\n\n\n<p>\u60a8\u9700\u8981\u8c03\u6574\u7c7b\u4f3c printf \u6216 scanf \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 &lt;inttypes.h&gt; \u4e2d\u7684 PRI \u548c SCN \u5b8f\u6765\u89e3\u51b3\u6b64\u95ee\u9898\uff0cPRIxPTR \u548c SCNxPTR \u5206\u522b\u7528\u4e8e\u5199\u5165\/\u8bfb\u53d6\u5341\u516d\u8fdb\u5236\u6307\u9488\uff0cPRId64 \u548c SCNd64 \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 1ULL \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<p><strong>1.3.5 \u5229\u7528 Android App Bundle \u51cf\u5c11\u5927\u5c0f\u589e\u52a0\u91cf<\/strong><\/p>\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 Android APP Bundle \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<p><strong>1.3.6 \u6e38\u620f\u5f00\u53d1\u8005<\/strong><\/p>\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<p><strong>1.3.7 Unity\u5f00\u53d1\u8005<\/strong><\/p>\n\n\n\n<p>\u5347\u7ea7\u5230\u652f\u6301\u7684\u7248\u672c<\/p>\n\n\n\n<p>Unity \u81ea\u7248\u672c 2018.2 \u548c 2017.4.16 \u5f00\u59cb\u63d0\u4f9b 64 \u4f4d\u652f\u6301\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u53d1\u73b0\u81ea\u5df1\u4f7f\u7528\u7684Unity\u7248\u672c\u4e0d\u652f\u630164\u4f4d\u67b6\u6784\uff0c\u8bf7\u786e\u5b9a\u8981\u5347\u7ea7\u5230\u7684\u7248\u672c\uff0c\u5e76\u6309\u7167Unity\u63d0\u4f9b\u7684\u6307\u5357\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\u5347\u7ea7\u5230\u8be5\u7f16\u8f91\u5668\u7684\u6700\u65b0LTS\u7248\u672c\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\u4e86Unity \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\/11\/20221121161017145.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\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\u6b64\u5904\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>&nbsp; &nbsp;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\/11\/20221121161021936.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>3.\u4f9d\u6b21\u8f6c\u5230 Player Settings Panel &gt; Settings for Android &gt; Other Settings &gt; Configuration<\/p>\n\n\n\n<p>4.\u5c06 Scripting Backend \u8bbe\u4e3a IL2CPP\u3002<\/p>\n\n\n\n<p>5.\u4f9d\u6b21\u9009\u62e9 Target Architecture &gt; ARM64 \u590d\u9009\u6846\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kb.cdn.yimenapp.com\/yimen\/2022\/11\/20221121161026116.png\" alt=\"image.png\" title=\"image.png\"\/><\/figure>\n\n\n\n<p>\u7167\u5e38\u6784\u5efa\uff01<\/p>\n\n\n\n<p>\u8bf7\u6ce8\u610f\uff0c\u9488\u5bf9ARM64\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\u6307\u5357\u6765\u7f29\u51cf APK \u5927\u5c0f\uff0c\u540c\u65f6\u8003\u8651\u5229\u7528 Android App Bundle \u529f\u80fd\u6765\u51cf\u5c0f\u5927\u5c0f\u589e\u52a0\u91cf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>1.4 \u5e94\u752864\u4f4d\u5408\u89c4\u6027\u68c0\u9a8c<\/h2>\n\n\n\n<p><strong>1.4.1 \u5408\u5e76 APK \u548c 64 \u4f4d\u5408\u89c4\u6027<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u8981\u4f7f\u7528 Google Play \u7684\u5408\u5e76 APK \u652f\u6301\u6765\u53d1\u5e03\u5e94\u7528\uff0c\u8bf7\u6ce8\u610f\u5728\u7248\u672c\u5c42\u9762\u8bc4\u4f30\u662f\u5426\u7b26\u5408 64 \u4f4d\u8981\u6c42\u3002\u4e0d\u8fc7\uff0c\u5982\u679c APK \u6216 <span class=\"wpcom_keyword_link\"><a href=\"https:\/\/www.yimenapp.com\" target=\"_blank\" title=\"\u5f00\u53d1app\u4ece\u4e00\u95e8\u5f00\u59cb\">app<\/a><\/span> bundle \u4e0d\u4f1a\u5206\u53d1\u7ed9\u642d\u8f7d Android 9 Pie \u6216\u66f4\u9ad8\u7248\u672c\u7684\u8bbe\u5907\uff0c\u5219\u4e0d\u9002\u7528 64 \u4f4d\u8981\u6c42\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u7684\u67d0\u4e2a APK \u88ab\u6807\u8bb0\u4e3a\u4e0d\u5408\u89c4\uff0c\u4f46\u8be5 APK \u6bd4\u8f83\u8001\u65e7\u4e14\u65e0\u6cd5\u4f7f\u5176\u5408\u89c4\uff0c\u4e00\u79cd\u7b56\u7565\u662f\u5728\u8be5 APK \u6e05\u5355\u7684 uses-sdk \u5143\u7d20\u4e2d\u6dfb\u52a0 maxSdkVersion=&#8221;27&#8243; \u5c5e\u6027\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u6b64 APK \u5c06\u4e0d\u4f1a\u88ab\u5206\u53d1\u7ed9\u642d\u8f7d Android 9 Pie \u6216\u66f4\u9ad8\u7248\u672c\u7684\u8bbe\u5907\uff0c\u56e0\u800c\u4e5f\u5c31\u4e0d\u4f1a\u518d\u59a8\u788d\u5408\u89c4\u3002<\/p>\n\n\n\n<p><strong>1.4.2 RenderScript\u548c64\u4f4d\u5408\u89c4\u6027<\/strong><\/p>\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 .bc \u6587\u4ef6\u4e2d\u300264 \u4f4d\u67b6\u6784\u4e0d\u518d\u652f\u6301\u8fd9\u4e9b\u65e7\u7684 .bc \u6587\u4ef6\uff0c\u56e0\u6b64\uff0c\u5982\u679c\u60a8\u7684APK \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 .bc \u6587\u4ef6\uff0c\u5c06\u73af\u5883\u5347\u7ea7\u5230 build-tools-21.0.0 \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u5e76\u5c06 Android Studio \u4e2d\u7684 renderscriptTargetApi \u8bbe\u4e3a 21+\uff0c\u4ee5\u6307\u793a\u7f16\u8bd1\u5668\u4e0d\u8981\u751f\u6210 .bc \u6587\u4ef6\u3002\u7136\u540e\uff0c\u91cd\u65b0\u6784\u5efa\u60a8\u7684\u5e94\u7528\uff0c\u68c0\u67e5\u662f\u5426\u6709 .bc \u6587\u4ef6\uff0c\u518d\u5c06\u5e94\u7528\u4e0a\u4f20\u5230 Play \u7ba1\u7406\u4e2d\u5fc3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u4e8c\u300164\u4f4d\u5e94\u7528\u6d4b\u8bd5<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>1.1 vivo\u8fdc\u7a0b\u771f\u673a\u8c03\u8bd5<\/h2>\n\n\n\n<p>vivo\u4e91\u6d4b\u5e73\u53f0\u63d0\u4f9bAndroid 5.1\u53ca\u4ee5\u540e\u7684\u90e8\u5206\u771f\u673a\u8c03\u8bd5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7\u4ee5\u4e0b\u94fe\u63a5\u8fdb\u5165\u8fdc\u7a0b\u771f\u673a\u8fdb\u884c\u8bd5\u7528\u4f53\u9a8c\uff1a<a href=\"https:\/\/vcl.vivo.com.cn\/#\/home\/index\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/vcl.vivo.com.cn\/#\/home\/index<\/a><\/p>\n\n\n\n<p>vivo Android 7.0\u4ee5\u540e\u7684\u5927\u90e8\u5206\u673a\u5668\u652f\u630164\u4f4d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>1.2 \u572864\u4f4d\u8bbe\u5907\u4e0a\u6d4b\u8bd5\u5e94\u7528<\/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>\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 &#8211;abi \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-preformatted\"># A successful install:<br>&gt; adb install --abi armeabi-v7a YOUR_APK_FILE.apk<br>Success<br><br># If your APK does not have the 64-bit libraries:<br>&gt; adb install --abi arm64-v8a YOUR_APK_FILE.apk<br>adb: failed to install YOUR_APK_FILE.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]<br><br># If your device does not support 64-bit, an emulator, for example:<br>&gt; adb install --abi arm64-v8a YOUR_APK_FILE.apk<br>ABI arm64-v8a not supported on this device<\/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\"><a><\/a>\u4e09\u300164\u4f4d\u5e94\u7528\u53d1\u5e03<\/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\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\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u56db\u3001\u53c2\u8003\u94fe\u63a5<\/h2>\n\n\n\n<p>\uff081\uff09Google\u6307\u5357\uff1a\u652f\u630164\u4f4d\u67b6\u6784<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/developer.android.com\/distribute\/best-practices\/develop\/64-bit?hl=zh-cn\n<\/div><\/figure>\n\n\n\n<p>\uff082\uff09 64-bit and Data Size Neutrality<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/unix.org\/whitepapers\/64bit.html\n<\/div><\/figure>\n\n\n\n<p>\uff083\uff0920 issues of porting C++ code on the 64-bit platform<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/pvs-studio.com\/en\/a\/0004\/\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>64\u4f4d\u5e94\u7528\u5fc5\u987b\u5305\u542b64\u4f4d\u5e93\u3002\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u5c31\u662f\u68c0\u67e5APK\u6587\u4ef6\u7684\u7ed3\u6784\uff0c\u5e93\u6587\u4ef6\u4f1a\u88ab\u6253\u5305\u5728APK\uff0c\u9488\u5bf9ARM\u67b6\u6784\u548cx86\u67b6\u6784\u5177\u4f53\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b:<\/p>\n","protected":false},"author":1,"featured_media":11511,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,94,160],"tags":[5302,2662,5303,5309,5307,5305,5310,5308,5306,5304,5311],"special":[66],"attr":[],"class_list":["post-11474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-appsj","category-appjc","category-appcs","tag-64-2","tag-2662","tag-5303","tag-analyze-apk","tag-android-studio","tag-arm","tag-armeabi-v7a","tag-build","tag-c","tag-x86","tag-x86_64","special-vivokfpt","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/11474","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=11474"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/11474\/revisions"}],"predecessor-version":[{"id":11535,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/11474\/revisions\/11535"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media\/11511"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=11474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=11474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=11474"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=11474"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=11474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}