Android development: ddms from the command line, not seeing devices

=================================

* SOLVED *: see answer below

I do not want to use Eclipse.

From the command line:

The emulator is running. adb server is running. "adb devices" is decommissioned correctly, and I can see my instance on avd in the output file.

However, when I manually start DDMS from the command line, it just tries to connect. I cannot find connection configuration problems.

Any suggestions (other than using Eclipse) are welcome!

(yes, it works from within eclipse and ddms shows streams, etc.)

System: Debian Squeeze

. update-java, , java " Java (TM) SE Runtime Environment ( 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
+3
4

Debian java IPv4.

/etc/sysctl.d/bindv6only.conf

net.ipv6.bindv6only = 0

bash

sudo invoke-rc.d procps restart

. Debian .

+7

- eclipse.ini :

 -Djava.net.preferIPv4Stack=true

.

+6

. , eclipse , , ddms, .

I think the Eclipse SDK starts the connection and prevents ddms from accessing the device or emulator.

0
source

IPv4 did not work for me, but connecting the device to another USB port solved this problem ( it did not appear in DDMS via the Android device )

0
source

Source: https://habr.com/ru/post/1759187/


All Articles