{"id":109,"date":"2026-08-19T21:43:46","date_gmt":"2026-08-19T13:43:46","guid":{"rendered":"http:\/\/xuanyuan123.site\/wordPress\/2026\/08\/19\/android-studio-%e8%b0%83%e8%af%95%e6%8a%a5%e9%94%99-connection-shut-down-by-remote-side-%e6%8e%92%e6%9f%a5%e6%8c%87%e5%8d%97\/"},"modified":"2026-08-19T21:47:55","modified_gmt":"2026-08-19T13:47:55","slug":"android-studio-%e8%b0%83%e8%af%95%e6%8a%a5%e9%94%99-connection-shut-down-by-remote-side-%e6%8e%92%e6%9f%a5%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"http:\/\/xuanyuan123.site\/wordPress\/2026\/08\/19\/android-studio-%e8%b0%83%e8%af%95%e6%8a%a5%e9%94%99-connection-shut-down-by-remote-side-%e6%8e%92%e6%9f%a5%e6%8c%87%e5%8d%97\/","title":{"rendered":"Android Studio \u8c03\u8bd5\u62a5\u9519 Connection shut down by remote side \u6392\u67e5\u6307\u5357"},"content":{"rendered":"<style>\n.tech-article {\n    line-height: 1.75;\n    color: #24292f;\n    font-size: 15px;\n}\n.tech-article h2 {\n    font-size: 1.3rem !important;\n    font-weight: 600 !important;\n    margin-top: 1.5rem !important;\n    margin-bottom: 0.4rem !important;\n    padding-bottom: 0.3rem !important;\n    border-bottom: 1px solid #eaecef !important;\n    line-height: 1.3 !important;\n}\n.tech-article h3 {\n    font-size: 1.12rem !important;\n    font-weight: 600 !important;\n    margin-top: 1.1rem !important;\n    margin-bottom: 0.35rem !important;\n    line-height: 1.35 !important;\n}\n.tech-article p {\n    margin-top: 0 !important;\n    margin-bottom: 0.65rem !important;\n    line-height: 1.75 !important;\n}\n.tech-article ul, .tech-article ol {\n    margin-top: 0 !important;\n    margin-bottom: 0.65rem !important;\n    padding-left: 1.5rem !important;\n}\n.tech-article li {\n    margin-bottom: 0.2rem !important;\n    line-height: 1.65 !important;\n}\n.tech-article pre {\n    background-color: #f6f8fa !important;\n    border: 1px solid #e1e4e8 !important;\n    border-radius: 6px !important;\n    padding: 12px 16px !important;\n    margin: 0.65rem 0 !important;\n    overflow-x: auto !important;\n    font-size: 13.5px !important;\n    line-height: 1.55 !important;\n}\n.tech-article code {\n    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;\n}\n.tech-article p code, .tech-article li code, .tech-article td code {\n    background-color: rgba(175, 184, 193, 0.2) !important;\n    padding: 0.2em 0.4em !important;\n    border-radius: 4px !important;\n    font-size: 88% !important;\n    color: #c7254e !important;\n}\n.tech-article blockquote {\n    margin: 0.65rem 0 !important;\n    padding: 8px 16px !important;\n    border-left: 4px solid #0969da !important;\n    background-color: #f6f8fa !important;\n    color: #57606a !important;\n}\n.tech-article blockquote p {\n    margin-bottom: 0 !important;\n}\n.tech-article table {\n    border-collapse: collapse !important;\n    width: 100% !important;\n    margin: 0.65rem 0 !important;\n    font-size: 14px !important;\n}\n.tech-article th, .tech-article td {\n    border: 1px solid #d0d7de !important;\n    padding: 6px 12px !important;\n}\n.tech-article th {\n    background-color: #f6f8fa !important;\n    font-weight: 600 !important;\n}\n.tech-article hr {\n    margin: 1.0rem 0 !important;\n    border: 0 !important;\n    border-top: 1px solid #eaecef !important;\n}\n<\/style>\n<div class=\"tech-article\">\n<blockquote>\n<p><strong>\u6838\u5fc3\u539f\u56e0<\/strong>\uff1aAndroid Studio \u9ed8\u8ba4\u7684 <code>Auto<\/code> \u6a21\u5f0f\u4f1a\u540c\u65f6\u62c9\u8d77 C\/C++ \u8c03\u8bd5\u5668\uff08<code>LLDB<\/code>\uff09\u3002\u5728 Android 15 (SDK 35) \u6216\u5b9a\u5236\u7cfb\u7edf\uff08\u5982\u6587\u77f3 Onyx\u3001\u5c0f\u7c73\u7b49\uff09\u4e0a\uff0cLLDB \u4f1a\u56e0 <code>ptrace<\/code> \u6743\u9650\u62e6\u622a\u6216\u8d85\u65f6\u9000\u51fa\uff0c\u5bfc\u81f4 ART \u865a\u62df\u673a\u7684 <code>JDWP<\/code> \u901a\u9053\u88ab\u8fde\u5e26\u5f3a\u5236\u5173\u95ed\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<h2>\u26a1 \u6781\u901f\u89e3\u51b3\u65b9\u6848<\/h2>\n<h3>1. \u7eaf Java \/ Kotlin \u9879\u76ee\uff08\u63a8\u8350\uff09<\/h3>\n<ul>\n<li><strong>\u8def\u5f84<\/strong>\uff1a<code>Run<\/code> \u27a1\ufe0f <code>Edit Configurations...<\/code> \u27a1\ufe0f <code>Debugger<\/code> \u6807\u7b7e\u9875\u3002<\/li>\n<li><strong>\u4fee\u6539<\/strong>\uff1a\u5c06 <code>Debug type<\/code> \u4ece <code>Auto<\/code> \u6539\u4e3a <code>Java Only<\/code>\u3002<\/li>\n<li><strong>\u6548\u679c<\/strong>\uff1a\u5b8c\u5168\u7ed5\u8fc7 LLDB\uff0c\u65ad\u8fde\u7387\u964d\u4e3a 0%\uff0c\u4e14\u5927\u5e45\u63d0\u5347\u8c03\u8bd5\u542f\u52a8\u901f\u5ea6\u3002<\/li>\n<\/ul>\n<h3>2. \u542b\u6709 C\/C++ (NDK\/JNI) \u7684\u9879\u76ee\uff08\u9700\u8c03\u8bd5 C++\uff09<\/h3>\n<ul>\n<li><strong>\u63a8\u8350\u505a\u6cd5\uff08\u5148 Run \u540e Attach\uff09<\/strong>\uff1a<br \/>\n  1. \u5c06 <code>Debug type<\/code> \u8bbe\u7f6e\u4e3a <code>Dual<\/code>\u3002<br \/>\n  2. \u70b9\u51fb\u7eff\u8272 <code>Run \u25b6\ufe0f<\/code> \u56fe\u6807\uff0c\u6b63\u5e38\u542f\u52a8 App\u3002<br \/>\n  3. App \u754c\u9762\u4eae\u8d77\u540e\uff0c\u70b9\u51fb\u9876\u90e8\u5de5\u5177\u680f <code>Attach Debugger to Android Process<\/code>\uff08\u624b\u673a\u7ea2\u866b\u56fe\u6807\uff09\u9644\u52a0\u8c03\u8bd5\u3002<\/li>\n<li><strong>\u5907\u9009<\/strong>\uff1a\u4ec5\u8c03\u8bd5 C++ \u903b\u8f91\u65f6\uff0c\u53ef\u5c06 <code>Debug type<\/code> \u9009\u4e3a <code>Native Only<\/code>\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\ud83d\udee0\ufe0f \u8f85\u52a9\u6392\u67e5\u4e0e\u9632\u62a4<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">\u6545\u969c\u573a\u666f<\/th>\n<th style=\"text-align: left;\">\u89e3\u51b3\u529e\u6cd5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>\u6587\u77f3\/\u5c0f\u7c73\u7b49\u7cfb\u7edf\u540e\u53f0\u51bb\u7ed3<\/strong><\/td>\n<td style=\"text-align: left;\">\u957f\u6309 App \u56fe\u6807 \u27a1\ufe0f \u5e94\u7528\u4f18\u5316 \u27a1\ufe0f \u5173\u95ed\u201c\u81ea\u52a8\u51bb\u7ed3\u201d\uff0c\u5141\u8bb8\u540e\u53f0\u8fd0\u884c<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Clash \/ VPN \u4ee3\u7406\u62e6\u622a<\/strong><\/td>\n<td style=\"text-align: left;\">\u5728 AS <code>Settings<\/code> \u27a1\ufe0f <code>HTTP Proxy<\/code> \u586b\u5199\u4f8b\u5916\uff1a<code>localhost, 127.0.0.1<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>\ud83d\udd0d \u547d\u4ee4\u884c\u5feb\u901f\u8bca\u65ad\uff08\u5b9a\u4f4d\u6839\u6e90\uff09<\/h2>\n<pre><code class=\"language-bash\"># \u8f6c\u53d1 JDWP \u7aef\u53e3\u5e76\u53d1\u9001\u63e1\u624b\u5305\u6d4b\u8bd5\nadb forward tcp:8700 jdwp:&lt;App_PID&gt;\n\npython3 -c &quot;import socket; s=socket.create_connection(('127.0.0.1', 8700)); s.sendall(b'JDWP-Handshake'); print(s.recv(14))&quot;\n<\/code><\/pre>\n<ul>\n<li>\u56de\u5305 <code>b'JDWP-Handshake'<\/code> \u27a1\ufe0f \u624b\u673a\u7aef\u6b63\u5e38\uff0c\u95ee\u9898\u5728 AS \/ LLDB \u51b2\u7a81\u6216\u4ee3\u7406\u62e6\u622a\u3002<\/li>\n<li>\u62a5\u9519 \/ \u65ad\u5f00 \u27a1\ufe0f \u624b\u673a\u7cfb\u7edf\u51bb\u7ed3\u4e86\u8fdb\u7a0b\uff0c\u6216\u6784\u5efa\u5305\u975e Debuggable\u3002<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6838\u5fc3\u539f\u56e0\uff1aAndroid Studio \u9ed8\u8ba4\u7684 Auto \u6a21\u5f0f\u4f1a\u540c\u65f6\u62c9\u8d77 C\/C++ \u8c03\u8bd5\u5668\uff08LLDB\uff09\u3002\u5728  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":1,"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":111,"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/posts\/109\/revisions\/111"}],"wp:attachment":[{"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xuanyuan123.site\/wordPress\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}