{"id":297742,"date":"2024-05-20T16:35:41","date_gmt":"2024-05-20T08:35:41","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/297742.html"},"modified":"2024-05-20T16:35:58","modified_gmt":"2024-05-20T08:35:58","slug":"android-%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%80%a7%e8%83%bd%e5%a6%82%e4%bd%95%e4%bc%98%e5%8c%96-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/297742.html","title":{"rendered":"Android \u5e94\u7528\u5f00\u53d1\u6027\u80fd\u5982\u4f55\u4f18\u5316"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27145433\/40fa4805-fa66-42ce-8200-d221c407f57f.webp\" alt=\"Android \u5e94\u7528\u5f00\u53d1\u6027\u80fd\u5982\u4f55\u4f18\u5316\" \/><\/p>\n<p><p><strong>Android\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u7684\u4f18\u5316<\/strong>\u5173\u952e\u5728\u4e8e\u8bc6\u522b\u5e76\u89e3\u51b3\u6027\u80fd\u74f6\u9888\uff0c\u5305\u62ec\u51cf\u5c11\u5e94\u7528\u542f\u52a8\u65f6\u95f4\u3001\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u3001\u63d0\u5347UI\u6d41\u7545\u5ea6\u3001\u589e\u5f3a\u7f51\u7edc\u8bf7\u6c42\u6548\u7387\u4ee5\u53ca\u4f18\u5316\u7535\u6c60\u4f7f\u7528\u6548\u7387\u3002\u5728\u8fd9\u4e9b\u65b9\u9762\uff0c\u91cd\u70b9\u5173\u6ce8UI\u6d41\u7545\u5ea6\u7684\u4f18\u5316\u5c24\u5176\u91cd\u8981\u3002UI\u6d41\u7545\u5ea6\u76f4\u63a5\u5f71\u54cd\u7528\u6237\u4f53\u9a8c\uff0c\u4e25\u91cd\u65f6\u751a\u81f3\u4f1a\u5bfc\u81f4\u7528\u6237\u653e\u5f03\u4f7f\u7528\u5e94\u7528\u3002\u4e3a\u786e\u4fddUI\u7684\u6d41\u7545\u6027\uff0c\u5f00\u53d1\u8005\u9700\u8981\u91c7\u7528\u9ad8\u6548\u7684\u5e03\u5c40\u8bbe\u8ba1\u3001\u7cbe\u786e\u7684<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\uff0c\u4ee5\u53ca\u5408\u7406\u7684\u89c6\u56fe\u66f4\u65b0\u7b56\u7565\uff0c\u4ece\u800c\u6700\u5c0f\u5316\u5e03\u5c40\u7684\u91cd\u6392\u6b21\u6570\u548c\u51cf\u5c11\u7ed8\u5236\u5ef6\u8fdf\u3002<\/p>\n<\/p>\n<p><h3><strong>\u4e00\u3001\u51cf\u5c11\u5e94\u7528\u542f\u52a8\u65f6\u95f4<\/strong><\/h3>\n<\/p>\n<p><p>\u5e94\u7528\u542f\u52a8\u65f6\u95f4\u662f\u7528\u6237\u4f53\u9a8c\u7684\u7b2c\u4e00\u5370\u8c61\uff0c\u5b83\u9700\u8981\u5c3d\u91cf\u77ed\uff0c\u4ee5\u4fbf\u5feb\u901f\u5438\u5f15\u7528\u6237\u8fdb\u5165\u5e94\u7528\u3002\u51cf\u5c11\u542f\u52a8\u65f6\u95f4\u7684\u65b9\u6cd5\u5305\u62ec\u5ef6\u8fdf\u521d\u59cb\u5316\u90e8\u5206\u8d44\u6e90\u3001\u4f7f\u7528MultiDex\u4f18\u5316\u542f\u52a8\u901f\u5ea6\u3001\u4ee5\u53ca\u5408\u7406\u5b89\u6392\u542f\u52a8\u4efb\u52a1\u7684\u6267\u884c\u987a\u5e8f\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5ef6\u8fdf\u521d\u59cb\u5316\u8d44\u6e90<\/strong>\uff1a\u5e94\u7528\u542f\u52a8\u65f6\u4e0d\u5fc5\u7acb\u5373\u52a0\u8f7d\u6240\u6709\u7ec4\u4ef6\u548c\u8d44\u6e90\u3002\u4f8b\u5982\uff0c\u67d0\u4e9b\u53ea\u5728\u7528\u6237\u8fdb\u5165\u7279\u5b9a\u529f\u80fd\u9875\u9762\u65f6\u624d\u9700\u8981\u7684\u8d44\u6e90\uff0c\u53ef\u4ee5\u63a8\u8fdf\u5230\u90a3\u65f6\u518d\u52a0\u8f7d\uff0c\u51cf\u8f7b\u521d\u59cb\u542f\u52a8\u7684\u8d1f\u62c5\u3002<\/li>\n<li><strong>MultiDex\u4f18\u5316<\/strong>\uff1a\u5bf9\u4e8e\u5927\u578b\u5e94\u7528\uff0c\u5e94\u7528\u542f\u52a8\u65f6\u53ef\u80fd\u9700\u8981\u52a0\u8f7d\u5927\u91cf\u7684\u7c7b\uff0c\u8fd9\u4f1a\u589e\u52a0\u542f\u52a8\u65f6\u95f4\u3002\u901a\u8fc7\u542f\u7528MultiDex\uff0c\u53ef\u4ee5\u5c06\u5e94\u7528\u5206\u5272\u6210\u591a\u4e2adex\u6587\u4ef6\uff0c\u4ece\u800c\u4f18\u5316\u542f\u52a8\u901f\u5ea6\u3002<\/li>\n<\/ol>\n<p><h3><strong>\u4e8c\u3001\u4f18\u5316\u5185\u5b58\u4f7f\u7528<\/strong><\/h3>\n<\/p>\n<p><p>\u5408\u7406\u7684\u5185\u5b58\u7ba1\u7406\u53ef\u4ee5\u907f\u514d\u5e94\u7528\u8fd0\u884c\u65f6\u51fa\u73b0\u5361\u987f\u3001\u5d29\u6e83\u7b49\u95ee\u9898\u3002\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u907f\u514d\u5185\u5b58\u6cc4\u6f0f\u3001\u5408\u7406\u7ba1\u7406\u56fe\u7247\u8d44\u6e90\u548c\u4f18\u5316\u6570\u636e\u7ed3\u6784\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u907f\u514d\u5185\u5b58\u6cc4\u6f0f<\/strong>\uff1a\u5185\u5b58\u6cc4\u6f0f\u4f1a\u5bfc\u81f4\u968f\u7740\u5e94\u7528\u8fd0\u884c\u65f6\u95f4\u7684\u589e\u52a0\uff0c\u53ef\u7528\u5185\u5b58\u9010\u6e10\u51cf\u5c11\uff0c\u6700\u7ec8\u53ef\u80fd\u5bfc\u81f4\u5e94\u7528\u5d29\u6e83\u3002\u5229\u7528\u5de5\u5177\u5982LeakCanary\u7b49\u8f85\u52a9\u68c0\u6d4b\u548c\u5b9a\u4f4d\u5185\u5b58\u6cc4\u6f0f\u70b9\u662f\u4e00\u79cd\u6709\u6548\u65b9\u6cd5\u3002<\/li>\n<li><strong>\u56fe\u7247\u8d44\u6e90\u7ba1\u7406<\/strong>\uff1a\u56fe\u7247\u662f\u5185\u5b58\u4f7f\u7528\u7684\u4e3b\u8981\u6d88\u8017\u8005\u4e4b\u4e00\u3002\u4f18\u5316\u56fe\u7247\u8d44\u6e90\u5305\u62ec\u4f7f\u7528\u9002\u5f53\u7684\u56fe\u7247\u683c\u5f0f\u3001\u5927\u5c0f\u548c\u5408\u7406\u7f13\u5b58\u7b56\u7565\u6765\u51cf\u5c11\u5185\u5b58\u7684\u4f7f\u7528\u3002<\/li>\n<\/ol>\n<p><h3><strong>\u4e09\u3001\u63d0\u5347UI\u6d41\u7545\u5ea6<\/strong><\/h3>\n<\/p>\n<p><p>UI\u6d41\u7545\u5ea6\u76f4\u63a5\u5173\u7cfb\u5230\u7528\u6237\u4f53\u9a8c\uff0c\u8981\u5b9e\u73b0\u9ad8\u6d41\u7545\u5ea6\u7684UI\uff0c\u9700\u8981\u5173\u6ce8\u5e03\u5c40\u4f18\u5316\u3001\u7ed8\u5236\u4f18\u5316\u548c\u52a8\u753b\u4f18\u5316\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5e03\u5c40\u4f18\u5316<\/strong>\uff1a\u4f7f\u7528\u5408\u7406\u7684\u5e03\u5c40\u7ed3\u6784\u53ef\u4ee5\u51cf\u5c11\u5e03\u5c40\u5c42\u7ea7\uff0c\u907f\u514d\u8fc7\u5ea6\u7ed8\u5236\u73b0\u8c61\u7684\u53d1\u751f\u3002\u4f8b\u5982\uff0c\u5c3d\u53ef\u80fd\u4f7f\u7528Constr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ntLayout\u4ee3\u66ff\u5d4c\u5957\u7684LinearLayout\u3002<\/li>\n<li><strong>\u52a8\u753b\u4f18\u5316<\/strong>\uff1a\u52a8\u753b\u6548\u679c\u867d\u7136\u80fd\u63d0\u5347\u7528\u6237\u4f53\u9a8c\uff0c\u4f46\u82e5\u5904\u7406\u4e0d\u5f53\u4e5f\u4f1a\u5bfc\u81f4UI\u5361\u987f\u3002\u4f18\u5316\u52a8\u753b\u5305\u62ec\u5408\u7406\u9009\u62e9\u52a8\u753b\u7c7b\u578b\u548c\u8c03\u6574\u52a8\u753b\u6267\u884c\u7684\u65f6\u673a\u3002<\/li>\n<\/ol>\n<p><h3><strong>\u56db\u3001\u589e\u5f3a\u7f51\u7edc\u8bf7\u6c42\u6548\u7387<\/strong><\/h3>\n<\/p>\n<p><p>\u5728\u79fb\u52a8\u5e94\u7528\u4e2d\uff0c\u7f51\u7edc\u8bf7\u6c42\u662f\u5e38\u89c1\u7684\u6027\u80fd\u74f6\u9888\u4e4b\u4e00\u3002\u4f18\u5316\u7f51\u7edc\u8bf7\u6c42\u4e3b\u8981\u4ece\u51cf\u5c11\u8bf7\u6c42\u6b21\u6570\u3001\u538b\u7f29\u6570\u636e\u4f20\u8f93\u91cf\u548c\u4f18\u5316\u6570\u636e\u89e3\u6790\u7b49\u65b9\u9762\u5165\u624b\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u51cf\u5c11\u8bf7\u6c42\u6b21\u6570<\/strong>\uff1a\u901a\u8fc7\u5408\u5e76\u8bf7\u6c42\u3001\u9884\u52a0\u8f7d\u6570\u636e\u7b49\u7b56\u7565\u51cf\u5c11\u7f51\u7edc\u8bf7\u6c42\u7684\u6b21\u6570\u3002<\/li>\n<li><strong>\u6570\u636e\u4f20\u8f93\u4f18\u5316<\/strong>\uff1a\u4f7f\u7528\u6570\u636e\u538b\u7f29\u6280\u672f\u51cf\u5c11\u4f20\u8f93\u7684\u6570\u636e\u91cf\uff0c\u52a0\u5feb\u6570\u636e\u7684\u4f20\u8f93\u901f\u5ea6\u3002<\/li>\n<\/ol>\n<p><h3><strong>\u4e94\u3001\u4f18\u5316\u7535\u6c60\u4f7f\u7528\u6548\u7387<\/strong><\/h3>\n<\/p>\n<p><p>\u5bf9\u7535\u6c60\u4f7f\u7528\u6548\u7387\u7684\u4f18\u5316\u80fd\u663e\u8457\u5ef6\u957f\u8bbe\u5907\u7684\u4f7f\u7528\u65f6\u95f4\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002\u8fd9\u5305\u62ec\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u540e\u53f0\u8fd0\u884c\u3001\u4f18\u5316\u5b9a\u4f4d\u8bf7\u6c42\u548c\u5408\u7406\u4f7f\u7528\u4f20\u611f\u5668\u7b49\u624b\u6bb5\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u51cf\u5c11\u540e\u53f0\u8fd0\u884c<\/strong>\uff1a\u5408\u7406\u63a7\u5236\u540e\u53f0\u4efb\u52a1\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u670d\u52a1\u548c\u8fdb\u7a0b\u5728\u540e\u53f0\u65e0\u610f\u4e49\u5730\u6d88\u8017\u7535\u91cf\u3002<\/li>\n<li><strong>\u4f18\u5316\u5b9a\u4f4d\u8bf7\u6c42<\/strong>\uff1a\u5b9a\u4f4d\u670d\u52a1\u662f\u5927\u91cf\u6d88\u8017\u7535\u91cf\u7684\u670d\u52a1\u4e4b\u4e00\u3002\u901a\u8fc7\u964d\u4f4e\u5b9a\u4f4d\u7cbe\u5ea6\u3001\u51cf\u5c11\u5b9a\u4f4d\u8bf7\u6c42\u6b21\u6570\u6765\u4f18\u5316\u7535\u91cf\u7684\u6d88\u8017\u3002<\/li>\n<\/ol>\n<p><p><strong>\u603b\u7ed3\u8d77\u6765\uff0cAndroid\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u7684\u4f18\u5316\u9700\u8981\u5f00\u53d1\u8005\u5728\u591a\u4e2a\u65b9\u9762\u91c7\u53d6\u63aa\u65bd\uff0c\u4ece\u5408\u7406\u8bbe\u8ba1\u5e03\u5c40\u3001\u7cbe\u7ec6\u7ba1\u7406\u5185\u5b58\u548c\u8d44\u6e90\uff0c\u5230\u4f18\u5316\u4ee3\u7801\u6267\u884c\u6548\u7387\u548c\u7535\u91cf\u6d88\u8017\uff0c\u6bcf\u4e00\u73af\u8282\u90fd\u4e0d\u53ef\u6216\u7f3a\u3002\u901a\u8fc7\u7efc\u5408\u8003\u8651\u4ee5\u4e0a\u65b9\u9762\uff0c\u53ef\u4ee5\u6709\u6548\u63d0\u5347\u5e94\u7528\u7684\u6574\u4f53\u6027\u80fd\uff0c\u8fdb\u800c\u63d0\u9ad8\u7528\u6237\u6ee1\u610f\u5ea6\u548c\u5e94\u7528\u7684\u5e02\u573a\u7ade\u4e89\u529b\u3002<\/strong><\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u4e3a\u4ec0\u4e48\u8981\u4f18\u5316Android\u5e94\u7528\u5f00\u53d1\u6027\u80fd\uff1f<\/strong><br \/>\nAndroid\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u4f18\u5316\u662f\u63d0\u5347\u5e94\u7528\u7684\u54cd\u5e94\u901f\u5ea6\u3001\u964d\u4f4e\u8d44\u6e90\u6d88\u8017\u3001\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u7684\u5173\u952e\u4e00\u6b65\u3002\u901a\u8fc7\u4f18\u5316\u5e94\u7528\u7684\u6027\u80fd\uff0c\u53ef\u4ee5\u589e\u52a0\u5e94\u7528\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\uff0c\u63d0\u5347\u5e94\u7528\u6392\u540d\uff0c\u5e76\u5438\u5f15\u66f4\u591a\u7684\u7528\u6237\u4f7f\u7528\u3002<\/p>\n<p><strong>2. \u6709\u54ea\u4e9b\u53ef\u4ee5\u4f18\u5316Android\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u7684\u65b9\u6cd5\uff1f<\/strong><br \/>\n\u6709\u5f88\u591a\u65b9\u6cd5\u53ef\u4ee5\u4f18\u5316Android\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u3002\u4f8b\u5982\uff0c\u5408\u7406\u4f7f\u7528\u5185\u5b58\u548c\u6570\u636e\u7ed3\u6784\u3001\u51cf\u5c11I\/O\u64cd\u4f5c\u3001\u4f18\u5316\u7f51\u7edc\u8bf7\u6c42\u3001\u4f7f\u7528\u5f02\u6b65\u4efb\u52a1\u6267\u884c\u8017\u65f6\u64cd\u4f5c\u3001\u8fdb\u884c\u4ee3\u7801\u4f18\u5316\u7b49\u3002\u53e6\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6027\u80fd\u76d1\u6d4b\u5de5\u5177\u6765\u68c0\u6d4b\u548c\u5b9a\u4f4d\u5e94\u7528\u7684\u6027\u80fd\u74f6\u9888\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u4f18\u5316\u3002<\/p>\n<p><strong>3. \u5982\u4f55\u8fdb\u884cAndroid\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u4f18\u5316\u7684\u6d4b\u8bd5\u548c\u8bc4\u4f30\uff1f<\/strong><br \/>\n\u5728\u4f18\u5316Android\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u8fdb\u884c\u6d4b\u8bd5\u548c\u8bc4\u4f30\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u6027\u80fd\u5206\u6790\u5de5\u5177\u6765\u68c0\u6d4b\u5e94\u7528\u7684\u6027\u80fd\u74f6\u9888\uff0c\u5e76\u6536\u96c6\u5173\u952e\u6307\u6807\u548c\u6570\u636e\u3002\u7136\u540e\uff0c\u6839\u636e\u6d4b\u8bd5\u7ed3\u679c\u8fdb\u884c\u6027\u80fd\u4f18\u5316\uff0c\u5e76\u901a\u8fc7\u518d\u6b21\u6d4b\u8bd5\u548c\u8bc4\u4f30\u6765\u9a8c\u8bc1\u4f18\u5316\u6548\u679c\u3002\u540c\u65f6\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u7528\u6237\u884c\u4e3a\u5206\u6790\u5de5\u5177\u6765\u4e86\u89e3\u7528\u6237\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u7684\u6027\u80fd\u9700\u6c42\u548c\u75db\u70b9\uff0c\u4ece\u800c\u6709\u9488\u5bf9\u6027\u5730\u8fdb\u884c\u6027\u80fd\u4f18\u5316\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Android\u5e94\u7528\u5f00\u53d1\u6027\u80fd\u7684\u4f18\u5316\u5173\u952e\u5728\u4e8e\u8bc6\u522b\u5e76\u89e3\u51b3\u6027\u80fd\u74f6\u9888\uff0c\u5305\u62ec\u51cf\u5c11\u5e94\u7528\u542f\u52a8\u65f6\u95f4\u3001\u4f18\u5316\u5185\u5b58\u4f7f\u7528\u3001\u63d0\u5347UI\u6d41\u7545\u5ea6 [&hellip;]","protected":false},"author":3,"featured_media":297764,"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\/297742"}],"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=297742"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/297742\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/297764"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=297742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=297742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=297742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}