Search code examples
androidandroid-studioadb

How to stop Android app built in Android Studio from waiting for debugger attaching?


After I started to use debugging with attaching debugger in Android Studio, I cannot install standalone package - it says "Waiting for debugger to attach" ! I cannot run program in another way, rather than from Android Studio itself! Same thing happens, if I press "Run" - than, even worse, it is waiting for debugger that is not even going to attach...

Note: I have also seen this question: How to stop debug without closing app in Android Studio 2 - However, in my case there is no stop button! I just disconnect


Solution

  • Do one of either:

    1. You have either accidentally set a breakpoint by misclicking either Ctrl + F8 or simply left clicking the line-count. So look through your code for that.

      • Tip: If you are unsure about this, create a new project and install it, if it works, this is most likely the error you are facing.
    2. You have selected an app to be debugged. Go to your phone's settings -> Developer Options -> Select app to be debugged -> No apps. This will clear it.

    3. Restart your phone.

    4. Uninstall your apk and reinstall it fresh again.