【问题标题】:emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused模拟器:连接到套接字“127.0.0.1:1970”时出错:111 -> 连接被拒绝
【发布时间】:2016-10-19 03:28:41
【问题描述】:

从 3.18 和 3.19 内核开始,模拟器已停止在 Fedora 21 上运行。 API 21 模拟器无法启动,它们卡在黑屏上。任何解决此问题的指针将不胜感激。

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 = 26
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 = 26
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 = 26
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 = 26
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 = 26
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 = 26
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 = 26
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 = 26
emulator: Error while connecting to socket '127.0.0.1:1970': 111 -> Connection refused

【问题讨论】:

    标签: android linux-kernel android-emulator fedora


    【解决方案1】:

    你设置了使用权限

    1. 互联网

    2. 网络套接字

    将其设置为 Manifest.XML 文件 uses-permission

    android:name="android.permission.ACCESS_NETWORK_STATE" 
    android:name="android.permission.INTERNET"
    

    Click For all Listed Permission

    【讨论】:

    • 权限适用于应用程序而非模拟器。
    【解决方案2】:

    修复它的补丁已被上游接受。 Workaround 仍然可用。

    该问题引用了英特尔开发人员的解决方法。

    我不能代表 Google,它决定何时发布新版本 模拟器(SDK 工具)。但是对于现在需要这个修复的人来说,它是 可以手动将其应用到他们的 Android SDK 安装:

    1. 下载附加的 bios.bin。这是我刚刚上传到https://android-review.googlesource.com/159501的同一个文件(仍然 正在审查中)。要从评论中下载,请使用以下链接 改为:
      https://android-review.googlesource.com/cat/159501%2C1%2Cx86/pc-bios/bios.bin%5E0

    2. 备份 $ANDROID_SDK_ROOT/tools/lib/pc-bios/bios.bin($ANDROID_SDK_ROOT 是 Android SDK 安装目录)。

    3. 将下载的 bios.bin 复制到 $ANDROID_SDK_ROOT/tools/lib/pc-bios/。

    【讨论】:

    • 请注意,这仅适用于 x86 映像,但不适用于 ARM 映像,来自 same thread