{"id":203772,"date":"2025-05-22T14:14:12","date_gmt":"2025-05-22T06:14:12","guid":{"rendered":"https:\/\/server.hk\/cnblog\/203772\/"},"modified":"2025-05-22T14:14:12","modified_gmt":"2025-05-22T06:14:12","slug":"%e5%ae%89%e5%8d%93%e8%87%aa%e5%ae%9a%e4%b9%89%e9%80%82%e9%85%8d%e5%99%a8%e6%a0%b7%e5%bc%8f%e5%8a%a0%e8%bd%bd%e5%a4%b1%e8%b4%a5%ef%bc%9a%e4%b8%ba%e4%bb%80%e4%b9%88%e5%8f%b3%e4%be%a7%e6%98%be%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/203772\/","title":{"rendered":"\u5b89\u5353\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u6837\u5f0f\u52a0\u8f7d\u5931\u8d25\uff1a\u4e3a\u4ec0\u4e48\u53f3\u4fa7\u663e\u793a\u7ea2\u8272\u5e76\u63d0\u793a\u201c\u65e0\u6cd5\u89e3\u91ca\u7b26\u53f7 mainitem\u201d\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5b89\u5353\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u6837\u5f0f\u52a0\u8f7d\u5931\u8d25\uff1a\u4e3a\u4ec0\u4e48\u53f3\u4fa7\u663e\u793a\u7ea2\u8272\u5e76\u63d0\u793a\u201c\u65e0\u6cd5\u89e3\u91ca\u7b26\u53f7 mainitem\u201d\uff1f<\/h1>\n<p>\u672c\u7bc7\u6587\u7ae0\u5411\u5927\u5bb6\u4ecb\u7ecd\u300a\u5b89\u5353\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u6837\u5f0f\u52a0\u8f7d\u5931\u8d25\uff1a\u4e3a\u4ec0\u4e48\u53f3\u4fa7\u663e\u793a\u7ea2\u8272\u5e76\u63d0\u793a\u201c\u65e0\u6cd5\u89e3\u91ca\u7b26\u53f7 mainitem\u201d\uff1f\u300b\uff0c\u4e3b\u8981\u5305\u62ec\uff0c\u5177\u6709\u4e00\u5b9a\u7684\u53c2\u8003\u4ef7\u503c\uff0c\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241123\/1732331204674146c44ec6b.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u5b89\u5353\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u65e0\u6cd5\u6b63\u5e38\u52a0\u8f7d\u6837\u5f0f<\/strong><\/p>\n<p>\u4e00\u4f4d\u5f00\u53d1\u8005\u9047\u5230\u4e86\u4e00\u4e2a\u95ee\u9898\uff1a\u4ed6\u4eec\u5728\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u4e2d\u52a0\u8f7d\u6837\u5f0f\u65f6\uff0c\u53f3\u4fa7\u603b\u662f\u663e\u793a\u4e3a\u7ea2\u8272\uff0c\u5e76\u63d0\u793a\u201c\u65e0\u6cd5\u89e3\u91ca\u7b26\u53f7 mainitem\u201d\u3002<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u7684\u539f\u56e0\u5728\u4e8e\uff0c\u5f00\u53d1\u8005\u9519\u8bef\u5730\u5bfc\u5165\u4e86\u7cfb\u7edf\u5305 android.r \u4e2d\u7684\u8d44\u6e90\u6587\u4ef6\u3002\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u5e94\u5bfc\u5165\u5f53\u524d\u9879\u76ee\u4e2d\u7684 r \u6587\u4ef6\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<ol>\n<li>\u79fb\u9664 android.r \u6587\u4ef6\u7684\u5bfc\u5165\u3002<\/li>\n<li>\u5bfc\u5165\u5f53\u524d\u9879\u76ee\u4e2d\u7684\u5305\u540d\uff0c\u7136\u540e\u5bfc\u5305\u4e2d\u7684 r \u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p>\u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>import com.example.myapp.R; \/\/ \u5f53\u524d\u9879\u76ee\u4e2d\u7684\u5305\u540d<\/pre>\n<p>\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300a\u5b89\u5353\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u6837\u5f0f\u52a0\u8f7d\u5931\u8d25\uff1a\u4e3a\u4ec0\u4e48\u53f3\u4fa7\u663e\u793a\u7ea2\u8272\u5e76\u63d0\u793a\u201c\u65e0\u6cd5\u89e3\u91ca\u7b26\u53f7 mainitem\u201d\uff1f\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8\u516c\u4f17\u53f7\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u5353\u81ea\u5b9a\u4e49\u9002\u914d\u5668\u6837\u5f0f\u52a0\u8f7d\u5931\u8d25\uff1a\u4e3a&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-203772","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/203772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=203772"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/203772\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=203772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=203772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=203772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}