java - Android adb 无法连接到 ip 地址

标签 java android

我已经在 Oracle Virtual box 中成功安装了 android 操作系统。

但是我遇到了一个问题,

我尝试了很多选择,但我无法解决这个问题。

我的问题是 - 我无法通过 adb 连接到 virtual box android os。

enter image description here

当我选择 host-only Adapter 选项时,很容易与 adb 连接,但在 android virtual box os 中没有 internet 连接。

enter image description here 当我选择 NAT 时,Internet 连接正常但无法连接到 adb。 enter image description here

请帮助我如何解决我的问题..

最佳答案

终于解决了我的问题。这是我的解决方案:

在模拟器中按 CTRL + Home 键,然后按设备 > 网络适配器。

Screenshot with results of pressing the keys

查看菜单,选择网络,然后选择桥接适配器。

Screenshot of the configurations

在模拟器中按 CTRL + ALT + F1 打开 Android 终端并输入以下命令:

netcfg

Example result of netcfg

按 CTRL + ALT + F7 查看图形 View 。

重启模拟器。 在命令中使用找到的IP:

adb connect <IP address>

关于java - Android adb 无法连接到 ip 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14108078/

相关文章:

java - JToolbar,停止水平移动

java - 没有方法在 RemoteViewsService 中触发 - Android

java - Mychart 确实显示了 android 中的任何内容

java - 当我在模拟器中尝试该应用程序时出现 "Unfortunately, app has stopped"错误消息

java - 使用 JApplet 创建动画

java - 如何将整数分配给枚举字段?

java - 使用powershell获取特定的java版本

java - 如何从 IntelliJ IDEA 14 连接到 Oracle 数据库?

Android - 停止广播接收器被服务杀死

javascript - 在 Android 中使用谷歌地图调用路线