{"id":3479,"date":"2023-04-14T16:52:03","date_gmt":"2023-04-14T08:52:03","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/exekaifa\/3479.html"},"modified":"2023-04-14T16:52:03","modified_gmt":"2023-04-14T08:52:03","slug":"android%e8%bf%9c%e7%a8%8b%e6%89%93%e5%8c%85%e7%9a%84%e5%8e%9f%e7%90%86%e4%bb%8b%e7%bb%8d%e5%92%8c%e6%ad%a5%e9%aa%a4%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/exekaifa\/3479.html","title":{"rendered":"android\u8fdc\u7a0b\u6253\u5305\u7684\u539f\u7406\u4ecb\u7ecd\u548c\u6b65\u9aa4\u5206\u6790"},"content":{"rendered":"<p>Android\u8fdc\u7a0b\u6253\u5305\u662f\u6307\u5728\u672c\u5730\u7535\u8111\u4e0a\u5bf9Android\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u6253\u5305\u7684\u8fc7\u7a0b\u3002\u5b83\u7684\u539f\u7406\u662f\u5229\u7528\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u7f16\u8bd1\u73af\u5883\uff0c\u5c06\u5f00\u53d1\u4eba\u5458\u672c\u5730\u4fee\u6539\u7684\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u7f16\u8bd1\u6253\u5305\uff0c\u6700\u7ec8\u751f\u6210\u53ef\u5b89\u88c5\u7684APK\u6587\u4ef6\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u6253\u5305\u7684\u6548\u7387\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u907f\u514d\u4e00\u4e9b\u672c\u5730\u73af\u5883\u4e0d\u4e00\u81f4\u5bfc\u81f4\u7684\u95ee\u9898\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u5177\u4f53\u7684\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u914d\u7f6e\u8fdc\u7a0b\u670d\u52a1\u5668\u73af\u5883<a href=\"https:\/\/exe.yimenapp.com\/tool-3517.html\">html\u53d8\u6210exe<\/a><\/p>\n<p>\u9996\u5148\u9700\u8981\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u642d\u5efaAndroid\u7f16\u8bd1\u73af\u5883\uff0c\u8fd9\u4e2a\u73af\u5883\u5305\u62ecJava SDK\u3001Android SDK\u3001Gradle\u7b49\u76f8\u5173\u7684\u5de5\u5177\u548c\u4f9d\u8d56\u5e93\u3002\u5177\u4f53\u7684\u642d\u5efa\u8fc7\u7a0b\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\u6216\u8005\u5176\u4ed6\u76f8\u5173\u6559\u7a0b\u3002<\/p>\n<p>2. \u914d\u7f6e\u672c\u5730\u5f00\u53d1\u73af\u5883<\/p>\n<p>\u5728\u672c\u5730\u7535\u8111\u4e0a\u5b89\u88c5Android Studio\uff0c\u5e76\u6839\u636e\u9879\u76ee\u9700\u8981\u914d\u7f6e\u597d\u76f8\u5e94\u7684\u5f00\u53d1\u73af\u5883\uff0c\u5305\u62ecJava SDK\u3001Android SDK\u3001Gradle\u7b49\u3002\u540c\u65f6\u9700\u8981\u5b89\u88c5SSH Client\uff0c\u4ee5\u4fbf\u53ef\u4ee5\u901a\u8fc7SSH\u534f\u8bae\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002<\/p>\n<p>3. \u7f16\u5199\u6253\u5305\u811a\u672c<\/p>\n<p>\u5728\u672c\u5730\u9879\u76ee\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u6253\u5305\u811a\u672c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528Shell\u811a\u672c\u6216\u8005Gradle\u811a\u672c\u7b49\u3002\u811a\u672c\u7684\u4e3b\u8981\u4f5c\u7528\u662f\u5c06\u672c\u5730\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u4e0a\u4f20\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\uff0c\u5e76\u6267\u884c\u8fdc\u7a0b\u6253\u5305\u547d\u4ee4\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684Shell\u811a\u672c\u793a\u4f8b\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>#!\/bin\/bash<\/p>\n<p># \u8fdc\u7a0b\u670d\u52a1\u5668IP\u5730\u5740<\/p>\n<p>REMOTE<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/16\/14\/16953839407.jpg\" \/><\/figure>\n<\/p>\n<p>_SERVER=&#8221;192.168.1.100&#8243;<\/p>\n<p># \u8fdc\u7a0b\u670d\u52a1\u5668\u7528\u6237\u540d<\/p>\n<p>REMOTE_USER=&#8221;username&#8221;<\/p>\n<p># \u8fdc\u7a0b\u670d\u52a1\u5668\u5bc6\u7801<\/p>\n<p>REMOTE_PASSWORD=&#8221;password&#8221;<\/p>\n<p># \u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u9879\u76ee\u8def\u5f84<\/p>\n<p>REMOTE_PROJECT_PATH=&#8221;\/home\/username\/myproject&#8221;<\/p>\n<p># \u4e0a\u4f20\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u5230\u8fdc\u7a0b\u670d\u52a1\u5668<\/p>\n<p>rsync -avz &#8211;exclude=&#8221;.git&#8221; &#8211;exclude=&#8221;.gradle&#8221; &#8211;exclude=&#8221;build&#8221; .\/ $REMOTE_USER@$REMOTE_SERVER:$REM<a href=\"https:\/\/exe.yimenapp.com\/tool-2836.html\">\u51b2\u9876\u8f6f\u4ef6exe<\/a>OTE_PROJECT_PATH<\/p>\n<p># \u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u6253\u5305\u547d\u4ee4<\/p>\n<p>ssh $REMOTE_USER@$REMOTE_SERVER &#8220;cd $REMOTE_PROJECT_PATH &amp;&amp; .\/gradlew assembleDebug&#8221;<\/p>\n<p>&#8220;`<\/p>\n<p>4. \u6267\u884c\u6253\u5305\u811a\u672c<\/p>\n<p>\u5728\u672c\u5730\u7ec8\u7aef\u4e2d\u6267\u884c\u6253\u5305\u811a\u672c\uff0c\u7b49\u5f85\u7a0b\u5e8f\u81ea\u52a8\u4e0a\u4f20\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u6267\u884c\u6253\u5305\u547d\u4ee4\u3002\u5982\u679c\u4e00\u5207\u987a\u5229\uff0c\u6700\u7ec8\u4f1a\u751f\u6210\u4e00\u4e2a\u53ef\u5b89\u88c5\u7684APK\u6587\u4ef6\uff0c\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u5230\u672c\u5730\u7535\u8111\u4e0a\u8fdb\u884c\u5b89\u88c5\u6d4b\u8bd5\u3002<\/p>\n<p>\u603b\u4e4b\uff0cAndroid\u8fdc\u7a0b\u6253\u5305\u662f\u4e00\u79cd\u975e\u5e38\u65b9\u4fbf\u7684\u6253\u5305\u65b9\u5f0f\uff0c\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002\u4f46\u662f\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u914d\u7f6e\u548c\u7f51\u7edc\u73af\u5883\u90fd\u4f1a\u5bf9\u6253\u5305\u6548\u679c\u4ea7\u751f\u5f71\u54cd\uff0c\u9700\u8981\u505a\u597d\u76f8\u5e94\u7684\u4f18\u5316\u548c\u8c03\u6574\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android\u8fdc\u7a0b\u6253\u5305\u662f\u6307\u5728\u672c\u5730\u7535\u8111\u4e0a\u5bf9Android\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u6253\u5305\u7684\u8fc7\u7a0b\u3002\u5b83\u7684\u539f\u7406\u662f\u5229\u7528\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u7f16\u8bd1\u73af\u5883\uff0c\u5c06\u5f00\u53d1\u4eba\u5458\u672c\u5730\u4fee\u6539\u7684\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u7f16\u8bd1\u6253\u5305\uff0c\u6700\u7ec8\u751f\u6210\u53ef\u5b89\u88c5\u7684AP<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[4033,4032,1024,839,356],"class_list":{"0":"post-3479","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-exekaifa","7":"tag-exe","9":"tag-1024","10":"tag-839","11":"tag-356"},"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/3479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=3479"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/3479\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=3479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=3479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=3479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}