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

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.


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