<i id='xpWA8'><tr id='xpWA8'><dt id='xpWA8'><q id='xpWA8'><span id='xpWA8'><b id='xpWA8'><form id='xpWA8'><ins id='xpWA8'></ins><ul id='xpWA8'></ul><sub id='xpWA8'></sub></form><legend id='xpWA8'></legend><bdo id='xpWA8'><pre id='xpWA8'><center id='xpWA8'></center></pre></bdo></b><th id='xpWA8'></th></span></q></dt></tr></i><div id='xpWA8'><tfoot id='xpWA8'></tfoot><dl id='xpWA8'><fieldset id='xpWA8'></fieldset></dl></div>
    <tfoot id='xpWA8'></tfoot>

    1. <small id='xpWA8'></small><noframes id='xpWA8'>

    2. <legend id='xpWA8'><style id='xpWA8'><dir id='xpWA8'><q id='xpWA8'></q></dir></style></legend>

        <bdo id='xpWA8'></bdo><ul id='xpWA8'></ul>
    3. 将 Android 设备连接到本地主机上的 Web 服务

      时间:2023-08-29
      <legend id='UmNtD'><style id='UmNtD'><dir id='UmNtD'><q id='UmNtD'></q></dir></style></legend>
      • <small id='UmNtD'></small><noframes id='UmNtD'>

        <tfoot id='UmNtD'></tfoot>

            <i id='UmNtD'><tr id='UmNtD'><dt id='UmNtD'><q id='UmNtD'><span id='UmNtD'><b id='UmNtD'><form id='UmNtD'><ins id='UmNtD'></ins><ul id='UmNtD'></ul><sub id='UmNtD'></sub></form><legend id='UmNtD'></legend><bdo id='UmNtD'><pre id='UmNtD'><center id='UmNtD'></center></pre></bdo></b><th id='UmNtD'></th></span></q></dt></tr></i><div id='UmNtD'><tfoot id='UmNtD'></tfoot><dl id='UmNtD'><fieldset id='UmNtD'></fieldset></dl></div>
              <bdo id='UmNtD'></bdo><ul id='UmNtD'></ul>

                  <tbody id='UmNtD'></tbody>
              1. 本文介绍了将 Android 设备连接到本地主机上的 Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我为 Android 应用程序实现了一个 Web 服务.Web 服务在我的本地主机 (192.168.1.2) 上运行.使用 Android 模拟器,我成功连接到 Web 服务.我尝试使用调试模式将我的 Android 设备连接到 Web 服务,但没有成功.所以我的问题是,是否可以在不使用真实 IP 的情况下将 Android 设备连接到在我的本地主机(192.168.1.2)上运行的这个 Web 服务?

                I implemented a web service for an Android application. The web service is running on my local host (192.168.1.2). Using the Android emulator I succeeded to connect to web service. The I tried to connect my Android device using debugging mode to web service but it didn't work. So my question is if it is possible to connect an Android device to this web service that is running on my local host (192.168.1.2) without using a real IP ?

                推荐答案

                google支持的更简单的方法!

                • 将手机通过usb连接到电脑并开启usb调试
                • 在您的计算机上打开 Chrome 浏览器并准确输入以下地址:chrome://inspect/#devices
                • 现在您可以通过端口转发按钮将您的计算机端口链接到您的设备端口.在我的计算机上,我在地址 localhost:61437 上有服务,我只是将它链接到设备的 8081 端口.记得勾选启用端口转发"复选框
                • It's much simpler way supported by google!

                  • Connect your phone via usb to computer and enable usb debugging
                  • On your computer open Chrome browser and type exactly this address: chrome://inspect/#devices
                  • Now you can link your computer port to your device port by port forwarding button. On my computer I have service on address localhost:61437 and I just linked it to device's 8081 port. Remeber to check 'Enable port forwarding' checkbox
                    • 我电脑上的服务屏幕 (localhost:61437)

                    使用相同服务 (localhost:8081) 的移动浏览器屏幕.就是这样.您也在您的应用程序中使用此服务地址

                    screen from my mobile browser with the same service ( localhost:8081). And that's it. Also you use this service address in your application

                    这篇关于将 Android 设备连接到本地主机上的 Web 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:Android Emulator 错误消息:“PANIC: Missing emulator engi 下一篇:英特尔在 Windows 操作系统上与 AMD 等效的 HAXM

                相关文章

                最新文章

              2. <small id='SJZ3b'></small><noframes id='SJZ3b'>

                    <tfoot id='SJZ3b'></tfoot>

                    <legend id='SJZ3b'><style id='SJZ3b'><dir id='SJZ3b'><q id='SJZ3b'></q></dir></style></legend>
                    <i id='SJZ3b'><tr id='SJZ3b'><dt id='SJZ3b'><q id='SJZ3b'><span id='SJZ3b'><b id='SJZ3b'><form id='SJZ3b'><ins id='SJZ3b'></ins><ul id='SJZ3b'></ul><sub id='SJZ3b'></sub></form><legend id='SJZ3b'></legend><bdo id='SJZ3b'><pre id='SJZ3b'><center id='SJZ3b'></center></pre></bdo></b><th id='SJZ3b'></th></span></q></dt></tr></i><div id='SJZ3b'><tfoot id='SJZ3b'></tfoot><dl id='SJZ3b'><fieldset id='SJZ3b'></fieldset></dl></div>

                    • <bdo id='SJZ3b'></bdo><ul id='SJZ3b'></ul>