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

89,437

Solution 1

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.

Solution 2

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).

Solution 3

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).

Solution 4

Please try this command to disable it.

adb shell am clear-debug-app

Solution 5

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

Share:
89,437

Related videos on Youtube

sensorario
Author by

sensorario

The winter is coming.

Updated on October 26, 2021

Comments

  • sensorario
    sensorario over 2 years

    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.

    • Son Huy TRAN
      Son Huy TRAN over 10 years
      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.
    • sensorario
      sensorario over 10 years
      Strange behavior. Ys, now it works. jajaj I have selected just my application and it works. Very very very strange behavior.
    • Nj Subedi
      Nj Subedi about 5 years
      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.
  • Franco
    Franco over 9 years
    This answer should the accepted one since it's much faster than rebooting the device. Worked for me on Nexus 4.
  • Shawn Lauzon
    Shawn Lauzon over 9 years
    Yes, this worked great for me. Even though it didn't say that my app was being debugged, selecting "None" for the choice fixed this super-annoying problem.
  • Youngjae
    Youngjae over 9 years
    @ShawnLauzon was right. Even it shows "None", just select None again.
  • Shnkc
    Shnkc about 9 years
    I had forgotten that I changed my localhost for a test. When I fix it, it worked.
  • MatPag
    MatPag over 8 years
    Worked on Marshmallow with Android Studio 1.5-rc1, thanks :)
  • Bruce
    Bruce over 8 years
    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 wtf
  • Martin
    Martin over 8 years
    Selecting none didn't work for me at first. I had to select an app, then select none and then it worked. .... I love technology
  • Pravin Bhosale
    Pravin Bhosale about 8 years
    yes its has a problem with ubuntu.Try to check you can ping to localhost.The above solutions solve my problem
  • running-codebase
    running-codebase about 8 years
    I tried this first but in my case a full reboot was required. (Android Studio 2.1.2)
  • toha
    toha almost 8 years
    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.
  • toto_tata
    toto_tata over 7 years
    Just to be more specific : this "Developer options" menu is in your Android phone (or simulator) settings. Not in Android Studio !
  • 700 Software
    700 Software over 7 years
    Make sure to switch USB Debugging back on.
  • colithium
    colithium over 7 years
    The option in Developer options is (now) called "Select debug app" (on Nexus devices at least). And instead of "None", it's "Nothing"
  • Lo-Tan
    Lo-Tan over 6 years
    Three years later, on a Pixel 2 XL, this is still the case. What the ****?
  • StuStirling
    StuStirling over 5 years
    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 worked
  • Shihab
    Shihab over 5 years
    This should be the accepted answer. Restarting will solve but the will again start after few attempts.
  • Someone Somewhere
    Someone Somewhere about 5 years
    device reboot & exited (and restarted) all Android Studio instances - worked for me
  • Jeffrey Blattman
    Jeffrey Blattman over 4 years
    This worked for me even there was nothing set in Developer Options (I just select "nothing", again).
  • Essam Adel
    Essam Adel over 4 years
    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.
  • big_m
    big_m about 4 years
    This solves the problem nicely, without waiting for a reboot. Thanks!
  • Ove Stoerholt
    Ove Stoerholt about 4 years
    No need to reboot device. Just issue above command. This should be the correct answer.
  • Jesus Almaral - Hackaprende
    Jesus Almaral - Hackaprende almost 4 years
    This is the best answer, no need to reboot
  • CantThinkOfAnything
    CantThinkOfAnything almost 4 years
    Very nice :) Fixed without reboot. Just an app restart.
  • Arpit Patel
    Arpit Patel almost 4 years
    you are life Saver
  • Donovan
    Donovan almost 4 years
    Worked fine for me
  • Donovan
    Donovan almost 4 years
    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.
  • Theta
    Theta over 3 years
    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.
  • programmer dreamer
    programmer dreamer over 2 years
    still the best solution (Samsung S10e, android 11) after 7 years the original answer posted. thumbs up!
  • Kenny
    Kenny over 2 years
    Worked for me too, same scenario. Experienced a number of flaky things recently.
  • viana
    viana over 2 years
    It worked for me.
  • NightStorm
    NightStorm over 2 years
    Works like a charm