0

Noob warning. I just installed Android Studio and I am trying to follow the "Build your first app" tutorial. I created the project and was attempting to run. I created a VM but was then unable to see it in the "Select Deployment Target" screen. Note that I can see the emulator image in the AVD screen, so it was created. It seems like adb did not start. I can go to the terminal and run adb and it is installed and on my path, but Android Studio does not seem to see it. I got the following from the log.

7:10 PM Unable to open connection to: localhost/192.168.1.43:5037, due to: java.net.ConnectException: Operation timed out

7:10 PM Connection attempts: 6

7:11 PM Unable to open connection to: localhost/192.168.1.43:5037, due to: java.net.ConnectException: Operation timed out

7:11 PM Connection attempts: 7

7:12 PM Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences.

7:12 PM * daemon not running; starting now at tcp:5037

7:12 PM * daemon started successfully

7:13 PM Unable to open connection to: localhost/192.168.1.43:5037, due to: java.net.ConnectException: Operation timed out

7:13 PM Connection attempts: 8

I am on osx.

Ed Fine
  • 717
  • 1
  • 6
  • 18

1 Answers1

0

First, move to your platform-tools directory

$ cd /Users/..../Android/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/

Then kill server

$ ./adb kill-server

Then restart the server

$ ./adb start-server
PushpikaWan
  • 2,437
  • 3
  • 14
  • 23
  • Thanks, but that is not doing it. To be clear, I am using the terminal inside Android Studio. Then I can kill and start the server, and the terminal does not report any errors. Then retrying the run command, I get similar errors: "8:00 PM Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by something else, choose a new port number in the preferences." – Ed Fine Nov 03 '18 at 03:03
  • In researching DDMS, it seems that was deprecated some time ago. – Ed Fine Nov 03 '18 at 03:06
  • Is the IP of localhost suspicious? Usually it is 127.1.*. I wonder if I have something conflicting. – Ed Fine Nov 03 '18 at 03:08
  • try to up it from another port https://stackoverflow.com/questions/3836571/changing-default-port-i-e-5037-on-which-adb-server-runs – PushpikaWan Nov 03 '18 at 03:11