Android studio: debug application on device

Question!

I have difficulties with with debugging at Android Studio. After trying to launch application in debug mode device show alert with "Waiting For Debugger" title that never disappear. Also I have android:debuggable="true" in my manifest file and seems like device connected correctly, because I can simply run my application without any problem. What I'm doing wrong?



Answers

Remove those lines related to debugging. When you launch an application from Android Studio it is signed with a debug key. Any debugging information you need can be viewed in logcat from Android Studio. Also make sure you are running the latest version (help -> check for updates) I think that's where its at.



I'm struggling with similar issue every day and as restarting the studio or the device is pretty time consuming (and sometimes even does not work), I was trying many things and by coincidence I found an awkward (but working) solution.

When you are in the situation when you hit debug button in Android Studio, the studio says it's connected and the device says: Waiting for Debugger, but the device waits forever, do this:

  • In Android Studio, hit the 'Edit Configurations' pop-up button
  • Once the Run/Debug Configurations dialog opens, the debug process starts!

Works like a miracle!

By : pepan


This video can help you solving your question :)
By: admin