Android开发:命令行中的ddms没有看到设备
作者:互联网
===============================
*已解决*:见下面的答案
我不想使用Eclipse.
从命令行:
模拟器正在运行. adb服务器正在运行. “adb devices”列出正确,我可以在输出中的avd上看到我的实例.
但是,当我从命令行手动启动DDMS时,它只是继续尝试连接.我找不到连接配置问题.
任何建议(除了“使用Eclipse”)最受欢迎!
(是的,它在eclipse中工作,ddms显示线程等)
系统:Debian Squeeze
更新:我运行了update-java-alternatives以确保java已正确设置为“Java(TM)SE运行时环境(版本1.6.0_20-b02)”.对于经验丰富的Debian用户来说,我的Java现在更糟糕了……当我从命令行运行ddms时,我得到: –
(ddms:9326): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
04:29 E/ddms: Failed to reopen debug port for Selected Client to: 8700
04:29 E/ddms: Invalid argument
java.net.SocketException: Invalid argument
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
at com.android.ddmlib.MonitorThread.reopenDebugSelectedPort(MonitorThread.java:716)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:226)
04:29 E/DeviceMonitor: Connection attempts: 1
04:30 E/DeviceMonitor: Connection attempts: 2
04:31 E/DeviceMonitor: Connection attempts: 3
04:32 E/DeviceMonitor: Connection attempts: 4
04:33 E/DeviceMonitor: Connection attempts: 5
04:34 E/DeviceMonitor: Connection attempts: 6
解决方法:
在Debian中,解决方案是强制java使用IPv4.
/etc/sysctl.d/bindv6only.conf
net.ipv6.bindv6only = 0
然后从bash
sudo invoke-rc.d procps restart
有关更多详细信息,请参阅Debian bug report.
标签:android,eclipse,adb,ddms,jdb 来源: https://codeday.me/bug/20190715/1463410.html