'IntelliJ IDEA and Android Studio create ADB conflict: Could not connect to remote process

I use the latest release of IDEA (now 2021.2.2) to develop the backend (and running tests) and the latest of Android Studio (now 2020.3.1) for the mobile app.

When both the IDEs are open and I run the mobile app in debug (on the emulator or on a real device is the same), ADB cannot connect the debugger to the app. the message is "Waiting for application to start debug server Could not connect to remote process. Aborting debug session." and on the device is "Application xyz is waiting for the debugger to attach"

If I close IDEA and then run again the app without closing the emulator, the message is "device is offline", like it was connected with IDEA and stopped with it.

So the result is that every time I want to debug the app and the backend together I have to:

  • close IDEA
  • shut down and reboot the emulator or the physical device
  • run the app in debug mode
  • waiting for the app to start and the debugger to attach
  • open IDEA and run the backend.

anyone else has the same problem ? Any idea how to disable adb on IDEA ?

thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source