Reputation: 4780
I have been working on a project, and when I run the project in android studio it had been running correct and when I ran in debug mode it ran correctly.
All of a sudden, when I try to run the project normally, it pops up on the device waiting for debugger
and in the logcat I get this:
02-07 10:38:46.444 3968-3968/com.geog.test D/dalvikvm﹕ Late-enabling CheckJNI
02-07 10:38:46.784 3968-3968/com.geog.test W/ActivityThread﹕ Application com.geog.visitdub is waiting for the debugger on port 8100...
02-07 10:38:46.804 3968-3968/com.geog.test I/System.out﹕ Sending WAIT chunk
and it goes no further. I don't know why this is happening, there is no debug command in the manifest, I have killed the adb and restarted as I did with android studio.
It's a real pain in the a*** as I can't run the app without going through debug mode. If anyone has any ideas I'd like to hear them
Thanks
Upvotes: 33
Views: 19487
Reputation: 2593
In my case, there are multiple debuggers. I have native code running in my app.
I cleared it by selecting the Debugger and Process from Run->Attach Debugger to Process
Upvotes: 1
Reputation: 21
First clear all the break points from your project using ctrl+shift+F8 for windows or for mac cmd+shift+F8. Restart your android device. Then run
Upvotes: 2
Reputation: 303
In my case it was a service to which I had added android.os.Debug.waitForDebugger(). The service was in a separate process by defining in the manifest android:process=":sepprocess"; after removing this line (such that the service is in the same process as the main activity), debugging started to work in the service and I did not experience the
I/System.out﹕ Sending WAIT chunk
anymore.
Upvotes: 2
Reputation: 648
In my case, there was an AsyncTask
whose doInBackground()
method called android.os.Debug.waitForDebugger()
, and this was being picked up even in run mode. Disabling the line fixed it. Restarting the device didn't help.
Upvotes: 3
Reputation: 4232
try this , always work :
1 - close Android Studio and any other IDE you have opened (maybe you have Eclipse also running?) and emulator instances;
2 - remove USB cable from PC and restart your phone if you use one ;
3 - run adb kill-server from console;
4 - open Android Studio;
5 - click on run/debug;
6 - when the window to select the device appears, attach your device to USB and USB to your computer;
Upvotes: 2
Reputation: 97
The above suggestions were too invasive for me so I digged a little more into it. The following solution works for me in android studio:
Upvotes: 5
Reputation: 25858
Restart your Android Device once and also check there should not be any breakpoints in your java classes.
Upvotes: 47