Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 448
sensorario Avatar asked Oct 03 '22 06:10

sensorario


People also ask

How do I turn off debug mode on Android?

Go to Settings. Tap System > Developer options. Go to USB debugging and flip the switch to turn it off.

How do I enable Wait for debugging?

Go to Settings > Developer options > Select debug app and choose your app from the list, then click Wait for debugger. Wait for the app to load and a dialog to appear telling you the app is waiting for a debugger.

Why is my USB debugging not working?

Make sure your Android device is enabled for USB debugging. On many Android devices, you can verify whether USB debugging is enabled by visiting the Settings|Developer Options page. Install the USB driver for your Android device.


2 Answers

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.

like image 357
John Lewin Avatar answered Oct 17 '22 16:10

John Lewin


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

like image 293
CodyF Avatar answered Oct 17 '22 16:10

CodyF