0

I'm working in Android Studio, and have been happily running in normal mode and debug mode for ages. Suddenly, debug mode has stopped working for me.

If I try to click on the Debug button (the little bug with the 'play' triangle), it attempts to start in the emulator, but the app never opens.

On the emulator, I get the "Waiting for debugger" alert, and the option to "Force Close". On Android Studio itself, the debug window at the bottom repeatedly shows "Waiting for application to come online:", and then "Could not connect to remote process. Aborting debug session."

I can run it fine in normal mode. It makes no difference whether I use the debug button to start the emulator, or whether it's already open in normal mode and I use the debug button to switch to debug mode.

I've tried restarting everything, and it hasn't made any difference. Any solutions I can find online are for much older versions of Android Studio.

Any ideas what I can try? I'm working around it with lots of Logs, but that's really slow.

halfer
  • 19,824
  • 17
  • 99
  • 186
Sharon
  • 3,471
  • 13
  • 60
  • 93
  • 1
    https://stackoverflow.com/a/36798348/3395198 – IntelliJ Amiya Apr 30 '18 at 09:26
  • Thanks, but nothing on that page worked! I don't think it's possible to change the USB Computer Connection via the emulator, is it? I'm also now getting an error that says "Emulator: WARNING: HAXM 6.2.0 is installed. Please install HAXM >= 6.2.1 to fix compatibility issues on Mac." - I'm pretty sure v.6.2.1 is what's installed on Android Studio, but do I need to change it on the emulator? If so, how? – Sharon Apr 30 '18 at 14:09
  • Ok, I uninstalled and reinstalled HAXM 6.2.1, which got rid of the HAXM error, but the debugger still isn't working. – Sharon Apr 30 '18 at 14:18
  • Then Raise a issue. – IntelliJ Amiya Apr 30 '18 at 14:22
  • Ok - how do I do that? – Sharon Apr 30 '18 at 18:51
  • 1
    https://developers.google.com/issue-tracker/guides/create-issue-ui – IntelliJ Amiya May 01 '18 at 03:16

2 Answers2

2

I seem to have resolved this by choosing the 'debug' flavour before opening the emulator. It makes sense to need to do that, but 1) it didn't work like that before and 2) if it's now required, it seems like there should be some kind of error message with more details. Hope this helps someone else, though!

Sharon
  • 3,471
  • 13
  • 60
  • 93
  • Hi, I'm experiencing the same problem, and I don't understand what you mean by "choosing debug flavour before opening the emulator". Can you please clarify? Thanks – Awer Muller Oct 09 '19 at 13:39
  • I have 2 versions of my app - debug and regular. I don't really remember this as it was over a year ago, but I think I just meant that I had to select the debug flavour and then open the emulator, rather than opening the emulator and then choosing the flavour. – Sharon Oct 12 '19 at 18:55
1

I tried to kill adb.exe process and this problem resolved.

(How to restart ADB manually from Android Studio)

halfer
  • 19,824
  • 17
  • 99
  • 186
Sayed Abolfazl Fatemi
  • 3,678
  • 3
  • 36
  • 48