简体   繁体   English

ubuntu:所有android模拟器(x86和arm)卡在“连接到套接字时出错'127.0.0.1:1970':111 - >连接被拒绝”

[英]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找到解决方案。

  1. Start your AVD and let it hang at the black screen 启动AVD,让它挂在黑屏上
  2. Open a terminal 打开一个终端
  3. Type telnet localhost 5554 (your port number may differ depending on your avd port) 输入telnet localhost 5554 (您的端口号可能因您的avd端口而异)
  4. Type redir add tcp:5000:6000 键入redir add tcp:5000:6000
  5. Your AVD should load into the lock screen in a few seconds 你的AVD应该在几秒钟内加载到锁定屏幕

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:197010.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.

相关问题 模拟器:连接至套接字“ 127.0.0.1:1970”时出错:111-&gt;连接被拒绝 - emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused Android模拟器无法在Macbook Pro上完成启动(连接到套接字&#39;127.0.0.1:1970&#39;时出错) - Android emulator does not complete startup on Macbook Pro (Error while connecting to socket '127.0.0.1:1970') 在android x86模拟器上运行apk,但在ARM智能手机上安装 - Run apk on android x86 emulator but install on ARM smartphone Android GPS获取位置在x86模拟器中返回null,但在arm模拟器中返回true - Android GPS get location return null in x86 emulator but return truth in arm emulator Android Studio的模拟器错误,但已经安装了Intel x86 - Emulator ERROR for android studios but intel x86 is already installed 在 Travis CI 中启动 Android x86 模拟器时出错 - Error launching Android x86 Emulator in Travis CI AndroidViewClient中的Culebra返回“ RuntimeError:错误:连接到 - Culebra in AndroidViewClient returns "RuntimeError: ERROR: Connecting to <socket… [Errno 111] Connection refused CPU 饥饿 android 模拟器:android ARM EABI 映像与 x86 映像 - CPU hungry android emulator : android ARM EABI image vs x86 image Android x86 是否模拟 ARM? - Does Android x86 emulate ARM? Android Studio中的ARM和x86 - ARM and x86 in Android studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM