Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cannot debug in Android Studio. My service never attaches to VM and never stops on breakpoints

Typical output in Debugger view:

Waiting for device. Target device: unknown_1-stv100_4-1161305457 Uploading file local path: /Users/homedir/devel6/avengers/packages/inputmethods/BlackBerryLatinIME/build/outputs/apk/My_APK_FILE-debug.apk remote path: /data/local/tmp/MY_SERVICE No apk changes detected. Skipping file upload, force stopping package instead. DEVICE SHELL COMMAND: am force-stop MY_SERVICE Waiting for process: MY_SERVICE

Then in 90% of case it starts to spam view screen with message:

Client not ready yet.

like image 575
Alex Chapiro Avatar asked Jan 18 '26 04:01

Alex Chapiro


1 Answers

I had a same problem. After I just add below codes to onCreate(), the problem is resolved.

android.os.Debug.waitForDebugger();

After I use android studio, I removed above code. Because studio works well without above codes unlike eclipse. But after update studio, I could not debug. It says like below

Waiting for process:
Client not ready yet.
Client not ready yet.
Client not ready yet.

It's not connected to the target VM.

like image 56
ssinto Avatar answered Jan 20 '26 19:01

ssinto