{"id":172056,"date":"2024-05-08T17:42:35","date_gmt":"2024-05-08T09:42:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/172056.html"},"modified":"2024-05-08T17:42:38","modified_gmt":"2024-05-08T09:42:38","slug":"android%e5%bc%80%e5%8f%91%e4%b8%ad%ef%bc%8c%e6%9c%89%e6%b2%a1%e6%9c%89%e4%bb%80%e4%b9%88%e4%bc%98%e9%9b%85%e5%9c%b0%e6%9b%bf%e6%8d%a2apk%e5%8c%85%e8%b5%84%e6%ba%90%e6%96%87%e4%bb%b6%e7%9a%84%e6%96%b9","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/172056.html","title":{"rendered":"Android\u5f00\u53d1\u4e2d\uff0c\u6709\u6ca1\u6709\u4ec0\u4e48\u4f18\u96c5\u5730\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\u7684\u65b9\u6cd5"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27043513\/1e104aea-6b21-4dc3-ba3e-61f96c4203c8.webp\" alt=\"Android\u5f00\u53d1\u4e2d\uff0c\u6709\u6ca1\u6709\u4ec0\u4e48\u4f18\u96c5\u5730\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\u7684\u65b9\u6cd5\" \/><\/p>\n<p><p>\u5728Android\u5f00\u53d1\u4e2d\uff0c\u4f18\u96c5\u5730\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec<strong>\u52a8\u6001\u8d44\u6e90\u52a0\u8f7d\u3001\u8d44\u6e90\u5206\u5305\u5904\u7406\u3001\u4f7f\u7528\u8d44\u6e90\u52a8\u6001\u66ff\u6362\u6846\u67b6\u3001\u4ee5\u53ca\u70ed\u66f4\u65b0\u6280\u672f<\/strong>\u56db\u79cd\u3002\u5176\u4e2d\uff0c\u52a8\u6001\u8d44\u6e90\u52a0\u8f7d\u53ef\u4ee5\u5728\u4e0d\u9700\u8981\u91cd\u65b0\u6253\u5305\u548c\u5b89\u88c5\u5e94\u7528\u7684\u60c5\u51b5\u4e0b\uff0c\u5b9e\u73b0\u8d44\u6e90\u7684\u66ff\u6362\u4e0e\u66f4\u65b0\uff0c\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u5e94\u7528\u7684\u7075\u6d3b\u6027\u548c\u7528\u6237\u4f53\u9a8c\u3002\u8fd9\u79cd\u65b9\u6cd5\u901a\u8fc7\u4ece\u670d\u52a1\u5668\u4e0b\u8f7d\u8d44\u6e90\u5305\uff0c\u5e76\u5728\u8fd0\u884c\u65f6\u66ff\u6362\u6216\u6dfb\u52a0\u8d44\u6e90\u6587\u4ef6\uff0c\u53ef\u7528\u4e8e\u4e3b\u9898\u5207\u6362\u3001\u76ae\u80a4\u66f4\u65b0\u7b49\u573a\u666f\u3002\u52a8\u6001\u8d44\u6e90\u52a0\u8f7d\u4e0d\u4ec5\u51cf\u5c11\u4e86\u7528\u6237\u7684\u7b49\u5f85\u65f6\u95f4\uff0c\u4e5f\u4e3a\u5e94\u7528\u7684\u8fed\u4ee3\u548c\u5347\u7ea7\u63d0\u4f9b\u4e86\u4fbf\u5229\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u52a8\u6001\u8d44\u6e90\u52a0\u8f7d<\/h3>\n<\/p>\n<p><p>\u52a8\u6001\u8d44\u6e90\u52a0\u8f7d\u6280\u672f\u5141\u8bb8\u5e94\u7528\u5728\u8fd0\u884c\u65f6\u4ece\u7f51\u7edc\u4e0a\u4e0b\u8f7d\u65b0\u7684\u8d44\u6e90\u6587\u4ef6\uff0c\u5982\u56fe\u7247\u3001\u6587\u672c\u3001\u5e03\u5c40\u6587\u4ef6\u7b49\uff0c\u5e76\u4f7f\u7528\u8fd9\u4e9b\u8d44\u6e90\u66ff\u4ee3\u6216\u65b0\u589e\u5230\u5e94\u7528\u4e2d\uff0c\u65e0\u9700\u91cd\u65b0\u5b89\u88c5APK\u3002\u8be5\u6280\u672f\u4e3b\u8981\u6d89\u53ca\u5230\u8d44\u6e90\u7684\u4e0b\u8f7d\u3001\u5b58\u50a8\u3001\u4e0e\u52a0\u8f7d\u4e09\u4e2a\u6838\u5fc3\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5e94\u7528\u9700\u8981\u63d0\u524d\u5b9a\u4e49\u597d\u8d44\u6e90\u7684\u66f4\u65b0\u673a\u5236\uff0c\u5305\u62ec\u8d44\u6e90\u670d\u52a1\u5668\u7684\u642d\u5efa\u3001\u8d44\u6e90\u7684\u7248\u672c\u63a7\u5236\u7b49\u3002\u5f53\u5e94\u7528\u542f\u52a8\u6216\u8005\u5728\u8fd0\u884c\u65f6\u5224\u65ad\u5230\u9700\u8981\u66f4\u65b0\u8d44\u6e90\u65f6\uff0c\u4f1a\u6839\u636e\u8d44\u6e90\u7248\u672c\u4fe1\u606f\u5411\u670d\u52a1\u5668\u8bf7\u6c42\u65b0\u7684\u8d44\u6e90\u5305\u3002<\/p>\n<\/p>\n<p><p>\u5176\u6b21\uff0c\u4e0b\u8f7d\u7684\u8d44\u6e90\u9700\u8981\u88ab\u4fdd\u5b58\u5230\u8bbe\u5907\u7684\u6307\u5b9a\u4f4d\u7f6e\u3002\u8fd9\u901a\u5e38\u6d89\u53ca\u5230\u6587\u4ef6\u7684\u89e3\u538b\u548c\u52a0\u5bc6\u4fdd\u62a4\u7b49\u64cd\u4f5c\uff0c\u4ee5\u9632\u8d44\u6e90\u88ab\u6076\u610f\u7be1\u6539\u6216\u6cc4\u9732\u3002<\/p>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u5e94\u7528\u901a\u8fc7\u81ea\u5b9a\u4e49ClassLoader\u6216\u4fee\u6539\u8d44\u6e90\u8def\u5f84\u52a0\u8f7d\u65b0\u7684\u8d44\u6e90\u6587\u4ef6\uff0c\u5b9e\u73b0\u52a8\u6001\u66ff\u6362\u3002\u8fd9\u4e00\u6b65\u9aa4\u9700\u8981\u6ce8\u610f\u8d44\u6e90\u7684\u517c\u5bb9\u6027\u548c\u7a33\u5b9a\u6027\uff0c\u786e\u4fdd\u65b0\u8d44\u6e90\u7684\u6b63\u5e38\u663e\u793a\u548c\u4f7f\u7528\u4e0d\u4f1a\u5f71\u54cd\u5df2\u6709\u529f\u80fd\u7684\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u8d44\u6e90\u5206\u5305\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u8d44\u6e90\u5206\u5305\u6307\u7684\u662f\u5c06\u5e94\u7528\u7684\u8d44\u6e90\u6587\u4ef6\u5206\u79bb\u51fa\u6765\uff0c\u5236\u4f5c\u6210\u591a\u4e2a\u8d44\u6e90\u5305\uff08\u5982\u4e3b\u9898\u5305\u3001\u8bed\u8a00\u5305\u7b49\uff09\uff0c\u6839\u636e\u7528\u6237\u7684\u9700\u8981\u52a8\u6001\u4e0b\u8f7d\u548c\u52a0\u8f7d\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\u53ef\u4ee5\u6709\u6548\u51cf\u5c0fAPK\u7684\u4f53\u79ef\uff0c\u52a0\u5feb\u9996\u6b21\u5b89\u88c5\u548c\u542f\u52a8\u901f\u5ea6\uff0c\u540c\u65f6\u6309\u9700\u52a0\u8f7d\u8d44\u6e90\uff0c\u8282\u7701\u7528\u6237\u7684\u5b58\u50a8\u7a7a\u95f4\u3002<\/p>\n<\/p>\n<p><p>\u5b9e\u73b0\u8d44\u6e90\u5206\u5305\u9996\u5148\u9700\u8981\u5728\u5e94\u7528\u6784\u5efa\u9636\u6bb5\uff0c\u901a\u8fc7\u5de5\u5177\u5c06\u8d44\u6e90\u6587\u4ef6\u5206\u79bb\u51fa\u6765\u6253\u5305\u3002\u7136\u540e\uff0c\u6839\u636e\u4e1a\u52a1\u9700\u6c42\uff0c\u5728\u5e94\u7528\u8fd0\u884c\u65f6\u6309\u9700\u4ece\u670d\u52a1\u5668\u4e0b\u8f7d\u5bf9\u5e94\u7684\u8d44\u6e90\u5305\u3002<\/p>\n<\/p>\n<p><p>\u8d44\u6e90\u5305\u4e0b\u8f7d\u540e\uff0c\u9700\u8981\u5c06\u5176\u89e3\u538b\u5230\u6307\u5b9a\u76ee\u5f55\uff0c\u5e76\u901a\u8fc7\u4fee\u6539\u8d44\u6e90\u52a0\u8f7d\u8def\u5f84\u7684\u65b9\u5f0f\uff0c\u4f7f\u5e94\u7528\u80fd\u591f\u8bfb\u53d6\u5230\u8fd9\u90e8\u5206\u5916\u7f6e\u7684\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u8d44\u6e90\u52a8\u6001\u66ff\u6362\u6846\u67b6<\/h3>\n<\/p>\n<p><p>\u5e02\u9762\u4e0a\u4e5f\u5b58\u5728\u4e00\u4e9b\u7b2c\u4e09\u65b9\u6846\u67b6\u652f\u6301\u52a8\u6001\u66ff\u6362\u8d44\u6e90\u6587\u4ef6\uff0c\u5982Tinker\u3001AndResGuard\u7b49\u3002\u8fd9\u4e9b\u6846\u67b6\u5927\u591a\u63d0\u4f9b\u4e86\u4e00\u5957\u6210\u719f\u7684\u89e3\u51b3\u65b9\u6848\u6765\u652f\u6301\u8d44\u6e90\u7684\u70ed\u66f4\u65b0\u548c\u52a8\u6001\u66ff\u6362\uff0c\u964d\u4f4e\u5f00\u53d1\u8005\u7684\u5b9e\u73b0\u96be\u5ea6\u3002<\/p>\n<\/p>\n<p><p>\u4ee5Tinker\u4e3a\u4f8b\uff0c\u5b83\u4e0d\u4ec5\u652f\u6301\u4ee3\u7801\u7684\u70ed\u4fee\u590d\uff0c\u540c\u65f6\u4e5f\u652f\u6301\u8d44\u6e90\u6587\u4ef6\u7684\u66f4\u65b0\u3002\u5f00\u53d1\u8005\u53ea\u9700\u8981\u6309\u7167\u6846\u67b6\u7684\u7ea6\u5b9a\u51c6\u5907\u597d\u8d44\u6e90\u66f4\u65b0\u5305\uff0cTinker\u5373\u53ef\u5728\u5e94\u7528\u8fd0\u884c\u65f6\u5c06\u65e7\u7684\u8d44\u6e90\u6587\u4ef6\u66ff\u6362\u4e3a\u65b0\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u8fd9\u7c7b\u6846\u67b6\u65f6\uff0c\u9700\u8981\u7279\u522b\u6ce8\u610f\u6846\u67b6\u7684\u96c6\u6210\u548c\u914d\u7f6e\uff0c\u4ee5\u53ca\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u786e\u4fdd\u8d44\u6e90\u66f4\u65b0\u7684\u5b89\u5168\u4e0e\u7a33\u5b9a\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u70ed\u66f4\u65b0\u6280\u672f<\/h3>\n<\/p>\n<p><p>\u70ed\u66f4\u65b0\u6280\u672f\u662f\u4e00\u79cd\u5728\u5e94\u7528\u8fd0\u884c\u65f6\u66f4\u65b0\u4ee3\u7801\u548c\u8d44\u6e90\u7684\u6280\u672f\uff0c\u65e0\u9700\u7528\u6237\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\u66f4\u65b0\u5305\u3002\u70ed\u66f4\u65b0\u7684\u5b9e\u73b0\u901a\u5e38\u57fa\u4e8e\u52a8\u6001\u52a0\u8f7d\u6280\u672f\uff0c\u901a\u8fc7\u66ff\u6362\u6216\u589e\u52a0\u8d44\u6e90\u6587\u4ef6\u548c\u4ee3\u7801\u8fbe\u5230\u66f4\u65b0\u7684\u76ee\u7684\u3002<\/p>\n<\/p>\n<p><p>\u70ed\u66f4\u65b0\u6280\u672f\u7684\u5173\u952e\u5728\u4e8e\u5982\u4f55\u786e\u4fdd\u66f4\u65b0\u7684\u8d44\u6e90\u6587\u4ef6\u548c\u4ee3\u7801\u80fd\u591f\u5b89\u5168\u3001\u7a33\u5b9a\u5730\u88ab\u52a0\u8f7d\u548c\u6267\u884c\uff0c\u8fd9\u6d89\u53ca\u5230\u590d\u6742\u7684\u7248\u672c\u63a7\u5236\u3001<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u548c\u5f02\u5e38\u5904\u7406\u673a\u5236\u3002<\/p>\n<\/p>\n<p><p>\u603b\u800c\u8a00\u4e4b\uff0cAndroid\u5f00\u53d1\u4e2d\u5b58\u5728\u591a\u79cd\u4f18\u96c5\u5730\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\u7684\u65b9\u6cd5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6839\u636e\u5e94\u7528\u7684\u5177\u4f53\u9700\u6c42\u548c\u573a\u666f\uff0c\u9009\u62e9\u6700\u5408\u9002\u7684\u5b9e\u73b0\u65b9\u6848\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u9700\u8981\u91cd\u89c6\u8d44\u6e90\u66f4\u65b0\u7684\u5b89\u5168\u6027\u3001\u7a33\u5b9a\u6027\u548c\u517c\u5bb9\u6027\uff0c\u786e\u4fdd\u7528\u6237\u4f53\u9a8c\u7684\u4e00\u81f4\u6027\u548c\u6d41\u7545\u5ea6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>Q1: \u5728Android\u5f00\u53d1\u4e2d\uff0c\u5982\u4f55\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\uff1f<\/strong><\/p>\n<p>A1: \u5728Android\u5f00\u53d1\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528AssetManager\u7c7b\u548cAssetManager.addAssetPath\u65b9\u6cd5\u6765\u5b9e\u73b0\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\u3002\u9996\u5148\uff0c\u5c06\u65b0\u7684APK\u5305\u6dfb\u52a0\u5230\u8d44\u6e90\u8def\u5f84\u4e2d\uff0c\u7136\u540e\u4f7f\u7528AssetManager\u83b7\u53d6\u8d44\u6e90\u5e76\u4f7f\u7528\u65b0\u7684\u8d44\u6e90\u66ff\u6362\u65e7\u7684\u8d44\u6e90\u3002<\/p>\n<p><strong>Q2: \u6709\u6ca1\u6709\u4e00\u79cd\u7b80\u6d01\u7684\u65b9\u6cd5\u6765\u66ff\u6362Android APK\u5305\u7684\u8d44\u6e90\u6587\u4ef6\uff1f<\/strong><\/p>\n<p>A2: \u662f\u7684\uff0c\u53ef\u4ee5\u4f7f\u7528\u8d44\u6e90\u5408\u5e76\u5de5\u5177\u6765\u66ff\u6362Android APK\u5305\u7684\u8d44\u6e90\u6587\u4ef6\u3002\u901a\u8fc7\u4f7f\u7528\u5de5\u5177\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u8f7b\u677e\u66ff\u6362APK\u5305\u4e2d\u7684\u8d44\u6e90\uff0c\u5305\u62ec\u5e03\u5c40\u6587\u4ef6\u3001\u56fe\u7247\u3001\u97f3\u9891\u7b49\u3002\u8fd9\u6837\u53ef\u4ee5\u8282\u7701\u65f6\u95f4\u548c\u7cbe\u529b\uff0c\u4f7f\u8d44\u6e90\u66ff\u6362\u66f4\u52a0\u9ad8\u6548\u3002<\/p>\n<p><strong>Q3: \u5728Android\u5f00\u53d1\u4e2d\uff0c\u662f\u5426\u5b58\u5728\u4e00\u79cd\u4f18\u96c5\u7684\u65b9\u5f0f\u6765\u52a8\u6001\u66ff\u6362APK\u5305\u7684\u8d44\u6e90\u6587\u4ef6\uff1f<\/strong><\/p>\n<p>A3: \u662f\u7684\uff0c\u53ef\u4ee5\u4f7f\u7528\u52a8\u6001\u52a0\u8f7d\u6280\u672f\u6765\u5b9e\u73b0Android APK\u5305\u8d44\u6e90\u6587\u4ef6\u7684\u52a8\u6001\u66ff\u6362\u3002\u901a\u8fc7\u4f7f\u7528\u52a8\u6001\u52a0\u8f7d\u6846\u67b6\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u66ff\u6362APK\u5305\u4e2d\u7684\u8d44\u6e90\u6587\u4ef6\uff0c\u800c\u65e0\u9700\u91cd\u65b0\u6253\u5305\u548c\u53d1\u5e03APK\u3002\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u7075\u6d3b\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u968f\u65f6\u66ff\u6362\u8d44\u6e90\u6587\u4ef6\uff0c\u4e3a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Android\u5f00\u53d1\u4e2d\uff0c\u4f18\u96c5\u5730\u66ff\u6362APK\u5305\u8d44\u6e90\u6587\u4ef6\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\u52a8\u6001\u8d44\u6e90\u52a0\u8f7d\u3001\u8d44\u6e90\u5206\u5305\u5904\u7406\u3001\u4f7f\u7528\u8d44\u6e90\u52a8\u6001\u66ff\u6362\u6846 [&hellip;]","protected":false},"author":3,"featured_media":172058,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/172056"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=172056"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/172056\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/172058"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=172056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=172056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=172056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}