IDEA 11 adb I / O error while trying to connect a debugger when 2 IDEA windows open

At this point, this error started with IDEA 11. I still could not find the correct template, but if the device or emulator is idle for a certain period of time (not long), and if I then try to push the project to the device / emulator and attach the debugger, first a message appears that IDEA is trying to connect to ADB (several message windows), and then the download starts, applications load, and then with an error:

Launching application: com.xxx/com.xxx.sMain. DEVICE SHELL COMMAND: am start -D -n "com.xxx/com.xxx.Main" I/O Error: Connection refused 

The only solution is to close both the emulator and IDEA or disconnect the real device from the USB cable.

Any ideas why this is happening? As I said, this happened with the device and the emulator, so I can not say that this applies to the device / emulator.

EDIT

I tried to restart ADB through the shell, this did not help either. This does not happen when I just run project, but only when I click debug .

EDIT 2 (18May)

I noticed that this happens when two IDEA screens open at the same time. For example, I open another project and want to open it in a new window. First, I launch the application in window 1, and then in window 2, but then the pop-up window “Try to connect to ADB” continues to open and close. I see that the memory is increasing by a couple MB, as every time a new popup is created. this causes IDEA to stop responding and I have to kill it.

I think this is a new mistake.

+4
source share

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


All Articles