{"id":40824,"date":"2026-06-23T15:28:50","date_gmt":"2026-06-23T07:28:50","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=40824"},"modified":"2026-06-23T15:28:50","modified_gmt":"2026-06-23T07:28:50","slug":"%e6%89%93%e5%8c%85app%e6%9c%ac%e5%9c%b0%e8%b5%84%e6%ba%90%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/40824\/","title":{"rendered":"\u6253\u5305app\u672c\u5730\u8d44\u6e90\u600e\u4e48\u5b9e\u73b0\uff1f"},"content":{"rendered":"<p>\u6253\u5305App\u672c\u5730\u8d44\u6e90\u7684\u539f\u7406\u4e0e\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p>\u968f\u7740\u79fb\u52a8\u4e92\u8054\u7f51\u7684\u666e\u53ca\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u81f4\u529b\u4e8e\u5f00\u53d1\u5404\u79cd\u529f\u80fd\u4e30\u5bcc\u3001\u7528\u6237\u4f53\u9a8c\u4f18\u79c0\u7684App\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5c06\u5404\u79cd\u8d44\u6e90\uff08\u5982\u56fe\u7247\u3001\u97f3\u9891\u3001\u89c6\u9891\u7b49\uff09\u6253\u5305\u5230App\u4e2d\uff0c\u4ee5\u4fbf\u5728\u4e0d\u540c\u8bbe\u5907\u548c\u5e73\u53f0\u4e0a\u8ba9\u7528\u6237\u65e0\u7f1d\u4f7f\u7528\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u6253\u5305App\u672c\u5730\u8d44\u6e90\u7684\u539f\u7406\u53ca\u5177\u4f53\u5b9e\u73b0\u3002<\/p>\n<p>\u4e00\u3001\u6253\u5305App\u672c\u5730\u8d44\u6e90\u7684\u539f\u7406<\/p>\n<p>1. \u4ec0\u4e48\u662f\u672c\u5730\u8d44\u6e90\uff1f<\/p>\n<p>\u672c\u5730\u8d44\u6e90\u662f\u6307App\u5185\u90e8\u5d4c\u5165\u7684\u56fe\u7247\u3001\u97f3\u9891\u3001\u89c6\u9891\u3001\u5b57\u4f53\u7b49\u6587\u4ef6\u3002\u8fd9\u4e9b\u672c\u5730\u8d44\u6e90\u968f\u7740App\u7684\u5b89\u88c5\u548c\u8fd0\u884c\u800c\u5b58\u5728\uff0c\u4e0d\u9700\u8981\u4ece\u670d\u52a1\u5668\u4e0b\u8f7d\uff0c\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u7f51\u7edc\u4f20\u8f93\u5e26\u6765\u7684\u5ef6\u8fdf\uff0c\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p>2. \u4e3a\u4ec0\u4e48\u8981\u6253\u5305\u672c\u5730\u8d44\u6e90\uff1f<\/p>\n<p>\u5c06\u8d44\u6e90\u6253\u5305\u5230App\u4e2d\uff0c\u53ef\u4ee5\u63d0\u4f9b\u66f4\u5feb\u901f\u3001\u53ef\u9760\u7684\u7528\u6237\u4f53\u9a8c\u3002\u9996\u5148\uff0c\u65e0\u9700\u4ece\u670d\u52a1\u5668\u4e0b\u8f7d\u8d44\u6e90\uff0c\u8282\u7701\u4e86\u7528\u6237\u7684\u6d41\u91cf\u3002\u5176\u6b21\uff0c\u7f51\u7edc\u8bf7\u6c42\u53ef\u80fd\u4f1a\u53d7\u5230\u4e0d\u7a33\u5b9a\u56e0\u7d20\uff08\u5982\u7f51\u7edc\u4e0d\u4f73\u6216\u670d\u52a1\u5668\u6545\u969c\uff09\u5f71\u54cd\uff0c\u800c\u6253\u5305\u5728\u672c\u5730\u7684\u8d44\u6e90\u53ef\u4ee5\u968f\u65f6\u8bbf\u95ee\u3001\u65e0\u987b\u7b49\u5f85\u3002\u6b64\u5916\uff0c\u672c\u5730\u8d44\u6e90\u786e\u4fdd\u4e86\u5373\u4f7f\u5728\u79bb\u7ebf\u72b6\u6001\u4e0b\uff0cApp\u4f9d\u7136\u5177\u6709\u57fa\u672c\u7684\u529f\u80fd\u3002<\/p>\n<p>3. \u6253\u5305\u672c\u5730\u8d44\u6e90\u7684\u539f\u7406<\/p>\n<p>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cApp\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u5f00\u53d1\u8005\u4f1a\u5c06\u8d44\u6e90\u6587\u4ef6\u653e\u7f6e\u5728\u7279\u5b9a\u7684\u76ee\u5f55\u4e0b\u3002\u5982Android\u9879\u76ee\u4e2d\u7684&#8221;res&#8221;\u6587\u4ef6\u5939\uff0ciOS\u9879\u76ee\u4e2d\u7684&#8221;Assets.xcassets&#8221;\u6587\u4ef6\u5939\u7b49\u3002\u7f16\u8bd1\u5668\u5728\u7f16\u8bd1App\u65f6\uff0c\u4f1a\u5c06\u8fd9\u4e9b\u76ee\u5f55\u4e0b\u7684\u8d44\u6e90\u6587\u4ef6\u4e00\u5e76\u6253\u5305\uff0c\u8f6c\u6362\u4e3a\u8bbe\u5907\u548c\u5e73\u53f0\u53ef\u4ee5\u8bc6\u522b\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u6b64\u540e\uff0cApp\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u53ef\u4ee5\u901a\u8fc7\u76f8\u5bf9\u8def\u5f84\u5f15\u7528\u8fd9\u4e9b\u8d44\u6e90\u3002<\/p>\n<p>\u4e8c\u3001\u6253\u5305App\u672c\u5730\u8d44\u6e90\u7684\u8be6\u7ec6\u4ecb\u7ecd<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u5206Android\u548ciOS\u4e24\u4e2a\u5e73\u53f0\uff0c\u5206\u522b\u4ecb\u7ecd\u5982\u4f55\u6253\u5305\u672c\u5730\u8d44\u6e90\u3002<\/p>\n<p>1. Android\u5e73\u53f0<\/p>\n<p>Android\u9879\u76ee\u4e2d\u7684\u8d44\u6e90\u6587\u4ef6\u901a\u5e38\u653e\u7f6e\u5728res\u6587\u4ef6\u5939\u4e0b\uff0c\u5e76\u6839\u636e\u8d44\u6e90\u7c7b\u578b\uff0c\u5206\u4e0d\u540c\u5b50\u76ee\u5f55\u5b58\u653e\u3002\u4f8b\u5982\uff0c\u56fe\u7247\u653e\u7f6e\u5728&#8221;res\/drawable&#8221;\u76ee\u5f55\u4e0b\uff0c\u97f3\u9891\u653e\u7f6e\u5728&#8221;res\/raw&#8221;\u76ee\u5f55\u4e0b\u3002\u4ee5\u4e0b\u4e3a\u5e38\u7528\u8d44\u6e90\u7c7b\u578b\u53ca\u5b58\u653e\u76ee\u5f55\uff1a<\/p>\n<p>&#8211; \u56fe\u7247\uff1ares\/drawab<a href=\"https:\/\/appfengzhuang.yimenapp.com\/app-308.html\">vue\u9879\u76ee\u5c01\u88c5app<\/a>le<\/p>\n<p>&#8211; \u97f3\u9891\uff1ares\/raw<\/p>\n<p>&#8211; \u89c6\u9891\uff1ares\/raw<\/p>\n<p>&#8211; \u5e03\u5c40\uff1ares\/layout<\/p>\n<p>&#8211; \u5b57\u4f53\uff1ares<a href=\"https:\/\/appfengzhuang.yimenapp.com\/app-104.html\">\u5b89\u5353\u7248app\u5c01\u88c5<\/a>\/font<\/p>\n<p>\u5728\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0cAndroid\u7f16\u8bd1\u5668\u4f1a\u5c06\u8fd9\u4e9b\u8d44\u6e90\u6587\u4ef6\u8f6c\u6362\u4e3a\u8bc6\u522b\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u5e76\u751f\u6210\u4e00\u4e2a\u8d44\u6e90ID\u6765\u7d22\u5f15\u3002\u7136\u540e\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7&#8221;R&#8221;\u7c7b\u4e2d\u7684\u8d44\u6e90ID\u5f15\u7528\u8fd9\u4e9b\u8d44\u6e90\u3002\u4f8b\u5982\uff0c\u5f15\u7528\u4e00\u5f20\u56fe\u7247\uff1a`imageView.setImageResource(R.drawable.image_name);`\u3002<\/p>\n<p>2. iOS\u5e73\u53f0<\/p>\n<p>iOS\u9879\u76ee\u4e2d\u7684\u8d44\u6e90\u6587\u4ef6\u901a\u5e38\u653e\u7f6e\u5728&#8221;Assets.xcassets&#8221;\u6587\u4ef6\u5939\u4e2d\u3002\u8fd9\u4e2a\u6587<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-04\/07\/09\/28472787687.jpg\" \/><\/figure>\n<\/p>\n<p>\u4ef6\u5939\u5305\u542b\u4e86\u591a\u4e2a&#8221;imageset&#8221;\u3001&#8221;dataset&#8221;\u7b49\u7c7b\u578b\uff0c\u5206\u522b\u5b58\u653e\u4e0d\u540c\u7c7b\u578b\u7684\u8d44\u6e90\u3002\u4f8b\u5982\uff0cImages.xcassets \u6587\u4ef6\u5939\u5305\u542b\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n<p>&#8211; \u56fe\u7247\uff1aImages.imageset<\/p>\n<p>&#8211; \u97f3\u9891\uff1aAudio.dataset<\/p>\n<p>&#8211; \u89c6\u9891\uff1aVideo.dataset<\/p>\n<p>&#8211; Launch\u56fe\u6807: LaunchImage.launchimage<\/p>\n<p>&#8211; App\u56fe\u6807: AppIcon.appiconset<\/p>\n<p>Xcode \u7f16\u8bd1\u5668\u5728\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u5c06\u8fd9\u4e9b\u8d44\u6e90\u6587\u4ef6\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u5e76\u5c06\u5b83\u4eec\u6253\u5305\u5230App\u5305\u4e2d\u3002\u4e4b\u540e\uff0c\u5f00\u53d1\u8005\u5c31\u53ef\u4ee5\u901a\u8fc7NSBundle APIs \u5f15\u7528\u8fd9\u4e9b\u8d44\u6e90\u3002\u4f8b\u5982\uff0c\u5f15\u7528\u4e00\u5f20\u56fe\u7247\uff1a`UIImage *image = [UIImage imageNamed:@&#8221;image_name&#8221;];`\u3002<\/p>\n<p>\u4e09\u3001\u603b\u7ed3<\/p>\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u6253\u5305App\u672c\u5730\u8d44\u6e90\u7684\u539f\u7406\u548c\u5b9e\u73b0\u3002\u901a\u8fc7\u5c06\u8d44\u6e90\u6587\u4ef6\u5d4c\u5957\u5230App\u5185\u90e8\uff0c\u7528\u6237\u80fd\u591f\u66f4\u5feb\u901f\u3001\u65b9\u4fbf\u5730\u4f7f\u7528App\u3002\u5145\u5206\u5229\u7528App\u672c\u5730\u8d44\u6e90\uff0c\u53ef\u4ee5\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u63d0\u9ad8\u7528\u6237\u4f53\u9a8c\uff0c\u964d\u4f4e\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u7aef\u95f4\u7684\u5ef6\u8fdf\u3002\u5982\u679c\u60a8\u9047\u5230\u4e86\u79fb\u52a8\u5e94\u7528\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u95ee\u9898\uff0c\u5e0c\u671b\u672c\u6587\u7ae0\u80fd\u4e3a\u60a8\u63d0\u4f9b\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6253\u5305App\u672c\u5730\u8d44\u6e90\u7684\u539f\u7406\u4e0e\u8be6\u7ec6\u4ecb\u7ecd\u968f\u7740\u79fb\u52a8\u4e92\u8054\u7f51\u7684\u666e\u53ca\uff0c\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u81f4\u529b\u4e8e\u5f00\u53d1\u5404\u79cd\u529f\u80fd\u4e30\u5bcc\u3001\u7528\u6237\u4f53\u9a8c\u4f18\u79c0\u7684App\u3002\u5728\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5c06\u5404\u79cd\u8d44\u6e90\uff08\u5982\u56fe\u7247\u3001\u97f3\u9891\u3001\u89c6\u9891\u7b49\uff09\u6253\u5305\u5230App\u4e2d\uff0c\u4ee5\u4fbf\u5728<\/p>\n","protected":false},"author":23,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3886,15841,16,414,810],"topic":[],"class_list":["post-40824","post","type-post","status-publish","format-standard","hentry","category-appkf","tag-h5app","tag-15841","tag-16","tag-414","tag-810"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/40824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=40824"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/40824\/revisions"}],"predecessor-version":[{"id":40829,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/40824\/revisions\/40829"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=40824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=40824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=40824"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=40824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}