Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "Launch error: Failed to connect to remote VM. Connection timed out" when trying to debug my app on my device in android

I tried all the possible options given on net and on this site, but none of them worked.

I am getting:

Launch error: Failed to connect to remote VM. Connection timed out.

when I am trying to debug my application on my mobile device. the application runs properly with out any issue when I am running normally

I have used at lease these links by now:

How to resolve "Waiting for Debugger" message?

Eclipse issue - Launch error: Failed to connect to remote VM. Connection timed out

Eclipse Error: "Failed to connect to remote VM"

Launch error: Failed to connect to remote VM

https://forums.oracle.com/forums/thread.jspa?threadID=653343

None of the above seem to work.

like image 875
Nik Avatar asked Nov 30 '22 03:11

Nik


2 Answers

Go to Window -> Preferences -> General -> Network Connections, and check if there is any proxy set here, change the 'Active Provider' to be 'Direct' and try again.

like image 134
moonese Avatar answered Dec 01 '22 15:12

moonese


I dont know why, but this works for me: First Run(or Debug) your application in an emulator and then Debug the application on the device (without closing the emulator). let me know if this works for you.

like image 20
M. Usman Khan Avatar answered Dec 01 '22 17:12

M. Usman Khan