i have try all android emulator, but they are all stuck on following step:
emulator: Error while connecting to socket \'127.0.0.1:1970\': 111 -> Connectio
I just spent hours trying to figure this out. Hopefully you found the answer but I will post this here in case anyone comes along looking for it. I had to use the ARM cpu. I am still looking to see if I can find a solution for x86.
telnet localhost 5554 (your port number may differ depending on your avd port) redir add tcp:5000:6000http://developer.android.com/tools/devices/emulator.html
I had same problem too. I was connected to internet. So I used my actual IP address.
Use this command ifconfig -a and get inet addr . Try it please, maybe it can help you.
If you want to connect to localhost, you need to use 10.0.2.2 on emulator.
So, in your case it should be : 10.0.2.2:1970
If you are using Genymotion's emulator use 10.0.3.2 instead 10.0.2.2.