Why Android Studio says "Waiting For Debugger" if am NOT debugging?
Asked Answered
D

17

251

I am working with Android Studio. Since last night, when I Run my project on my device, appear the message "Waiting For Debugger". It is a very strange behavior because I am not debugging application.

I've tried to uninstall application from my device and press Run on Android Studio. The message appears again.

I've tried to restart Android Studio. The message appears again.

The only way to properly install application on my phone is to press "Debug". The message appears but its automatically closed. Then application works fine.

I've tried with

<application android:debuggable="false" />

... and still the message appears.

LogCat says:

E/InputDispatcher﹕ channel ~ Channel is unrecoverably broken and will be disposed!
E/Launcher﹕ Error finding setting, default accessibility to not found: accessibility_enabled

Regards on first error line, someone says that the problems can starts after renaming of some resource. But its not my case.

Regards on second error line, ... I don't know. I really don't know what happens to my IDE.

Dealing answered 12/12, 2013 at 7:49 Comment(3)
I faced with this problem once. My problem is not on the Android Studio but in my device. I remove the application in Settings->Development settings->debug applications, and it runs. I don't know if your problem is the same at mine.Cemetery
Strange behavior. Ys, now it works. jajaj I have selected just my application and it works. Very very very strange behavior.Dealing
This is an issue with the Android device. Turn off and turn on the "USB Debugging" option from the Developer Options settings menu. Also make sure "Select debug app" has nothing selected.Giorgia
A
375

I've ran into this issue in the past and again today. In my case the problem is resolved by a device reboot. After a clean boot I can again run the application and the "Waiting for Debugger" prompt does not appear.

Apyretic answered 3/7, 2014 at 17:36 Comment(4)
My Developer Mode is on and Debugging Mode is On too. But, my alcatel onetouch flash plus (one) is not working. But same preferences is working at my Lenovo A706. I have reboot alcatel, but not working.Fasciation
device reboot & exited (and restarted) all Android Studio instances - worked for meBoldt
I don't know if you mean booting the computer/laptop or the emulator. But I booted my laptop and the problem still and even reinstalled the android studio and I was still getting the problem, so I whipped the data of the emulator and everything is fixed. Thank you.Samhita
Didnt feel like doing a full reboot so I tried the next answer and it worked for me. I'm sure restarting probably would have done the trick as well, but saving time is also good.Andi
B
321

You can fix this issue without re-booting your device. Just go to "Android device"->"Settings"->"Developer Options"->"Select app to be debugged" / "Select debug app". It will likely be pointing to your application. Just select the option and then select "None".

Note: As mentioned, even if "None" is already selected, re-selecting "None" appears to correct the problem.

Note #2: In newer Android devices, the settings location / name might be a bit different. I.e., in my case (Android 11, Samsung) the "None" option is shown as "Nothing" instead.

Just to be clear: This is on the device, not in Android Studio (cf. very helpful comment from Regis_AG).

Barge answered 6/11, 2014 at 15:30 Comment(12)
Worked on Marshmallow with Android Studio 1.5-rc1, thanks :)Olaolaf
The suggestions to select 'None' even though it shows 'None' sounds crazy but I glad that I give it a try... that is exactly the fix wtfAristotelian
Selecting none didn't work for me at first. I had to select an app, then select none and then it worked. .... I love technologyDiatomic
Just to be more specific : this "Developer options" menu is in your Android phone (or simulator) settings. Not in Android Studio !Text
The option in Developer options is (now) called "Select debug app" (on Nexus devices at least). And instead of "None", it's "Nothing"Cowitch
Three years later, on a Pixel 2 XL, this is still the case. What the ****?Zayin
Just occurred on a Pixel 2 XL Android Emulator running API 26 in Android Studio 3.2.1. I can confirm the tip about selecting Nothing workedDawna
This should be the accepted answer. Restarting will solve but the will again start after few attempts.Chamade
This worked for me even there was nothing set in Developer Options (I just select "nothing", again).Conjunction
Had the issue on a Xiaomi a moment ago when I tried to run the app normally after debugging it for some time, this answer worked.Kendry
still the best solution (Samsung S10e, android 11) after 7 years the original answer posted. thumbs up!Vociferation
On my Samsung J6...this was a lifesaver as I'm testing background notis. Thanks, man!Varletry
S
59

faster than rebooting is Just go to developer options and switch it off and on again (dont forget to check usb debugging option too), worked for me(Neuxs5).

Segmentation answered 12/10, 2014 at 10:18 Comment(5)
This answer should the accepted one since it's much faster than rebooting the device. Worked for me on Nexus 4.Sinasinai
I tried this first but in my case a full reboot was required. (Android Studio 2.1.2)Irresponsible
Make sure to switch USB Debugging back on.Audubon
This is the best answer, no need to rebootQuadrivium
Works like a charmFaus
G
58

Please try this command to disable it.

adb shell am clear-debug-app
Gratification answered 2/5, 2020 at 15:57 Comment(4)
This solves the problem nicely, without waiting for a reboot. Thanks!Extraneous
No need to reboot device. Just issue above command. This should be the correct answer.Phillada
Very nice :) Fixed without reboot. Just an app restart.Joline
This worked for me. I was getting the error while using an emulator. Much appreciated. Saved my day.Saurischian
D
10

Without restarting the device, I was able to fix this issue by going to "Developer Options" and then first "disabling" and then "enabling"-

  1. USB Debugging
  2. Wireless ADB Debugging (Since I debug over the Wifi)

enter image description here

Discriminator answered 15/7, 2020 at 7:21 Comment(1)
Worked fine for meAndi
S
5

After 8 hours on this problem I feel obliged to share the cause. My /etc/hosts was bad.

Make sure you can ping localhost and that it is defined to 127.0.0.1. AS expects to connect to localhost:8600.

Stomachache answered 9/3, 2015 at 4:7 Comment(2)
I had forgotten that I changed my localhost for a test. When I fix it, it worked.Midis
yes its has a problem with ubuntu.Try to check you can ping to localhost.The above solutions solve my problemSubstitute
P
4

1) Clear android studio cache memory from file->Invalid cache/restart.


2) After restarting the android studio please restart android emulator.

Photoelectric answered 5/6, 2015 at 18:32 Comment(0)
E
3

I have the same problem. In my case I have two development environments open in the same time: Android Studio and Eclipse. After I close Eclipse and run the debug process again works well. Hope this help!

Entomologize answered 2/3, 2015 at 13:56 Comment(0)
K
3

I uninstalled the app with which this issue was occurring.

Then I installed the app with debug mode.

It solved the problem. Now it is working fine.

Katlynkatmai answered 12/11, 2018 at 6:54 Comment(0)
P
2

You may want to check your debugging setting in Dev Setting on your AVD. Take a look at the following picture:

developer settings example

developer settings example

Prisage answered 25/10, 2016 at 9:26 Comment(0)
M
1

I have already solve this problem by reboot my device. It is a device issue not android studio issue.

Marven answered 7/1, 2016 at 10:41 Comment(0)
K
1

My PC was running low on memory and this problem appeared quite often. Fix was to free up more memory by deleting old files/apps. I notice that running emulators like Android TV tend to need a lot of memory for them to run predictably

Kalat answered 29/1, 2016 at 15:21 Comment(0)
F
1

Click on AVD Manager. From device actions option select "Cold Boot Now" Doing a cold boot in the emulator worked for me.

Fanfani answered 23/11, 2019 at 5:41 Comment(0)
S
1

Clic and hold the Emulator's power button for 5 seconds, then clic restart.

Try again, the error should be gone

Safeconduct answered 14/7, 2020 at 19:11 Comment(0)
F
1

Save everything using ctrl+s or "File" -> "Save all". Go to your project directory and delete the .gradle folder then refresh window using F5. After this step, open project in Android Studio and run the application using Shift+F10 or Run -> "Run app". Then it should run in normal mode.

Flying answered 26/2, 2021 at 4:31 Comment(0)
I
1

In my case the debug was stuck and didn't advance. So I remove the ".lldb" folder in the path "C:\Users{user}.lldb" and now is working.

Inanimate answered 22/10, 2021 at 14:30 Comment(0)
H
0

I had this problem; In Android Studio I accidentally hit Run > 'Debug App' instead of Run> Run 'App' . I solved the problem. In my case I had to get the application to launch successfully in DEBUG mode. Here were my steps-

1) The android device needs to be able to connect to the development PC on port 8600. This connection was being disallowed by my firewall configuration. I turned off the firewall. Once confirmed I created a firewall rule to allow connectivity between the devices on port 8600.

2) To validate that the port is available, you can go into Android Studio, Run > Attach debugger to Android Process. This will cause the android device application launched in DEBUG mode to connect to your Android Studio development PC.

3) Once the app has launched once, you can go back and Run > Run 'App' and you will no longer get the annoying screen 'WAITING for DEBUGGER'.

4) And you can also Run> Debug 'App'. The device will say "Waiting for Debugger" for a moment and then Android Studio will start up a Debugger Console and help you debug your android device app remotely!

Good luck

Husted answered 14/3, 2015 at 19:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.