[英]ubuntu: all android emulator(x86 and arm) stuck on “Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused”
i have try all android emulator, but they are all stuck on following step: 我已经尝试了所有的Android模拟器,但他们都坚持下面的步骤:
emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused
emulator: ASC 127.0.0.1:1970: Retrying connection. Connector FD =
this is my cli: path/to/emulator64-x86 -avd x86 -debug all
这是我的cli: path/to/emulator64-x86 -avd x86 -debug all
this is my full log 这是我的完整日志
my question is 我的问题是
How to fix this error? 如何解决这个错误?
my system info: 我的系统信息:
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 17 Qiana
Release: 17
Codename: qiana
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. 我不得不使用ARM cpu。 I am still looking to see if I can find a solution for x86. 我仍然在寻找能否为x86找到解决方案。
telnet localhost 5554
(your port number may differ depending on your avd port) 输入telnet localhost 5554
(您的端口号可能因您的avd端口而异) redir add tcp:5000:6000
键入redir add tcp:5000:6000
http://developer.android.com/tools/devices/emulator.html http://developer.android.com/tools/devices/emulator.html
If you want to connect to localhost, you need to use 10.0.2.2
on emulator. 如果要连接到localhost,则需要在模拟器上使用10.0.2.2
。
So, in your case it should be : 10.0.2.2:1970
所以,在你的情况下它应该是: 10.0.2.2:1970
: 10.0.2.2:1970
If you are using Genymotion's
emulator use 10.0.3.2
instead 10.0.2.2
. 如果您使用的是Genymotion's
模拟器,请使用10.0.3.2
而不是10.0.2.2
。
I had same problem too. 我也有同样的问题。 I was connected to internet. 我连接到互联网。 So I used my actual IP address. 所以我使用了我的实际IP地址。 Use this command ifconfig -a
and get inet addr
. 使用此命令ifconfig -a
并获取inet addr
。 Try it please, maybe it can help you. 试试吧,也许它可以帮到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.