{"id":17171,"date":"2023-04-11T12:06:37","date_gmt":"2023-04-11T04:06:37","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/17171\/"},"modified":"2023-04-11T12:06:37","modified_gmt":"2023-04-11T04:06:37","slug":"%e5%8e%9f%e7%94%9f%e5%ae%89%e5%8d%93%e5%bc%80%e5%8f%91%e4%b8%80%e8%88%ac%e6%b5%81%e7%a8%8b%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/17171\/","title":{"rendered":"\u539f\u751f\u5b89\u5353\u5f00\u53d1\u4e00\u822c\u6d41\u7a0b\u4ecb\u7ecd"},"content":{"rendered":"<p>\u539f\u751f\u5b89\u5353\u5f00\u53d1\u6307\u7684\u662f\u4f7f\u7528Android SDK\u548cJava\u7f16\u5199<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f\/\" title=\"\u5e94\u7528\u7a0b\u5e8f\" target=\"_blank\">\u5e94\u7528\u7a0b\u5e8f<\/a><\/span>\u7684\u5f00\u53d1\u65b9\u5f0f\u3002\u4e0e\u4f7f\u7528\u8de8\u5e73\u53f0\u6846\u67b6\uff08\u5982React Native\u3001Flutter\u7b49\uff09\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\u4e0d\u540c\uff0c\u539f\u751f\u5f00\u53d1\u53ef\u4ee5\u5145\u5206\u5229\u7528Android\u7cfb\u7edf\u7684\u7279\u6027\uff0c\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p>\u4e0b\u9762\u5c06\u4ecb\u7ecd\u539f\u751f\u5b89\u5353\u5f00\u53d1\u7684\u57fa\u672c\u539f\u7406\u548c\u6d41\u7a0b\u3002<\/p>\n<p>1. \u5f00\u53d1\u73af\u5883\u642d\u5efa<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/31\/15\/21628459068.jpg\" \/><\/figure><\/p>\n<p>\u9996\u5148\u9700\u8981\u5b89\u88c5Android Studio\uff0c\u8fd9\u662fGoogle\u5b98\u65b9\u63a8\u51fa\u7684<span class=\"wpcom_keyword_link\"><a href=\"https:\/\/android.yimenapp.com\" title=\"Android\u5f00\u53d1\u4ece\u4e00\u95e8\u5f00\u59cb\">Android\u5f00\u53d1<\/a><\/span>\u5de5\u5177\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u914d\u7f6eJava Development Kit\uff08JDK\uff09\u548cAndroid SDK\u3002<\/p>\n<p>2. \u9879\u76ee\u521b\u5efa<\/p>\n<p>\u5728Android Studio\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u9700\u8981\u9009\u62e9\u5e94\u7528\u7a0b\u5e8f\u540d\u79f0\u3001\u5305\u540d\u3001\u6700\u4f4e\u652f\u6301\u7684Android\u7248\u672c\u7b49\u4fe1\u606f\u3002\u521b\u5efa\u5b8c\u6210\u540e\uff0c\u4f1a\u81ea\u52a8\u751f\u6210\u4e00\u4e9b\u57fa\u672c\u7684<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e4%bb%a3%e7%a0%81\/\" title=\"\u4ee3\u7801\" target=\"_blank\">\u4ee3\u7801<\/a><\/span>\u548c\u6587\u4ef6\uff0c\u5305\u62ecMainActivity.java\u548cactivity_main.xml\u7b49\u3002<\/p>\n<p>3. UI\u8bbe\u8ba1<\/p>\n<p>\u5728activity_main.xml\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5404\u79cd\u5e03\u5c40\u548c<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e6%8e%a7%e4%bb%b6\/\" title=\"\u63a7\u4ef6\" target=\"_blank\">\u63a7\u4ef6<\/a><\/span>\u6765\u8bbe\u8ba1\u7528\u6237\u754c\u9762\u3002\u5e38\u7528\u7684\u5e03\u5c40\u6709LinearLayout\u3001RelativeLayout\u548cConstraintLayout\u7b49\u3002\u5e38\u7528\u7684\u63a7\u4ef6\u6709<a href=\"https:\/\/www.yimenapp.net\/dabao-1259.html\">\u5f00\u53d1app \u8bbe\u7f6e\u81ea\u5b9a\u4e49useragent<\/a>TextView\u3001Bu<a href=\"https:\/\/www.yimenapp.net\/dabao-4800.html\">ipa\u4ea7\u54c1<\/a>tton\u3001EditText\u3001ImageView\u7b49\u3002<\/p>\n<p>4. \u4ee3\u7801\u7f16\u5199<\/p>\n<p>\u5728MainActivity.java\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u7f16\u5199\u5e94\u7528\u7a0b\u5e8f\u7684\u903b\u8f91\u4ee3\u7801\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u5728onCreate()\u65b9\u6cd5\u4e2d\u521d\u59cb\u5316\u63a7\u4ef6\u548c\u76d1\u542c\u4e8b\u4ef6\uff0c\u5b9e\u73b0\u5e94\u7528\u7a0b\u5e8f\u7684\u4ea4\u4e92\u529f\u80fd\u3002\u8fd8\u53ef\u4ee5\u7f16\u5199\u5176\u4ed6\u65b9\u6cd5\u6765\u5b9e\u73b0\u5e94\u7528\u7a0b\u5e8f\u7684\u5404\u79cd\u529f\u80fd\u3002<\/p>\n<p>5. \u8c03\u8bd5\u548c\u6d4b\u8bd5<\/p>\n<p>\u5b8c\u6210\u4ee3\u7801\u7f16\u5199\u540e\uff0c\u53ef\u4ee5\u5728Android Studio\u4e2d\u8fdb\u884c\u8c03\u8bd5\u548c\u6d4b\u8bd5\u3002Android Studio\u63d0\u4f9b\u4e86\u6a21\u62df\u5668\u548c\u771f\u673a\u8c03\u8bd5\u4e24\u79cd\u65b9\u5f0f\u3002\u5728\u6a21\u62df\u5668\u4e2d\u6d4b\u8bd5\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u4e0d\u540c\u7684Android\u7248\u672c\u548c\u8bbe\u5907\u578b\u53f7\u3002<\/p>\n<p>6. \u6253\u5305\u548c\u53d1\u5e03<\/p>\n<p>\u5f53\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u5b8c\u6210\u540e\uff0c\u9700\u8981\u5c06\u5176\u6253\u5305\u6210APK\u6587\u4ef6\uff0c\u5e76\u53d1\u5e03\u5230Google Play\u7b49\u5e94\u7528\u5e02\u573a\u3002\u5728Android Studio\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528Gradle\u6765\u81ea\u52a8\u5316\u6253\u5305\u548c\u53d1\u5e03\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u539f\u751f\u5b89\u5353\u5f00\u53d1\u9700\u8981\u638c\u63e1Java\u7f16\u7a0b\u8bed\u8a00\u548cAndroid SDK\u7684\u57fa\u672c\u77e5\u8bc6\u3002\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u9700\u8981\u6ce8\u610fUI\u8bbe\u8ba1\u3001\u4ee3\u7801\u7f16\u5199\u3001\u8c03\u8bd5\u548c\u6d4b\u8bd5\u7b49\u73af\u8282\uff0c\u4ee5\u4fdd\u8bc1\u5e94\u7528\u7a0b\u5e8f\u7684\u8d28\u91cf\u548c\u7a33\u5b9a\u6027\u3002\u540c\u65f6\uff0c\u9700\u8981\u5173\u6ce8Android\u7cfb\u7edf\u7684\u7248\u672c\u548c\u8bbe\u5907\u517c\u5bb9\u6027\uff0c\u4ee5\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5728\u5404\u79cdAndroid\u8bbe\u5907\u4e0a\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u751f\u5b89\u5353\u5f00\u53d1\u6307\u7684\u662f\u4f7f\u7528Android SDK\u548cJava\u7f16\u5199\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u65b9\u5f0f\u3002\u4e0e\u4f7f\u7528\u8de8\u5e73\u53f0\u6846\u67b6\uff08\u5982React Native\u3001Flutter\u7b49\uff09\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\u4e0d\u540c\uff0c\u539f\u751f\u5f00\u53d1\u53ef\u4ee5\u5145\u5206\u5229\u7528Android\u7cfb\u7edf<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[9071,1870,9072,2445,8372],"special":[],"attr":[],"class_list":["post-17171","post","type-post","status-publish","format-standard","hentry","category-www","tag-android-lancet","tag-1870","tag-appapk","tag-2445","tag-8372","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/17171","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\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=17171"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/17171\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=17171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=17171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=17171"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=17171"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=17171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}