当我在 Android Studio 中点击“运行应用程序”按钮时,“选择部署目标”对话框仍然为空,即使我已经创建了“Nexus S API 24”虚拟设备来运行我的应用程序。我收到以下错误:
08:22:39 error: Invalid argument: cannot open transport registration socketpair
08:22:39 could not read ok from ADB Server
08:22:39 * failed to start daemon *
08:22:39 error: cannot connect to daemon
08:22:39 'C:\Users\samarc\AppData\Local\Android\sdk1\platform-tools\adb.exe,start-server' failed -- run manually if necessary
当我尝试直接从 AVD 管理器运行虚拟设备时,我得到以下错误列表(以及一个对话框,显示“这台机器上运行的模拟器实例似乎太多。正在中止”):
C:\Users\samarc\AppData\Local\Android\sdk1\tools\emulator.exe -netdelay none -netspeed full -avd Nexus_S_API_24
libpng warning: iCCP: known incorrect sRGB profile
Hax is enabled
libpng warning: iCCP: known incorrect sRGB profile
Hax ram_size 0x40000000
libpng warning: iCCP: known incorrect sRGB profile
HAX is working and emulator runs in fast virt mode.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
emulator: WARNING: UpdateCheck: Failure: Error
我该怎么办?我已经尝试过以下操作:
- 1) 检查端口 (5554 - 5587) 的可用性。 (可用)
- 2) 使用 Windows 防火墙解锁端口 (5554 - 5587),但这也不起作用。 (尽管我开始认为 Android Studio 使用了其他一些端口。我如何找出 Android Studio 使用的是哪个端口?)
- 3) 在任务管理器中终止进程“adb.exe”。 (事实是任务管理器中没有任何名为“adb.exe”的进程在运行!)
- 4) 重新启动计算机。 (从不工作)
- 5) 重新安装 Android Studio(也没用)
我该怎么办?我使用 Windows 7 x64 和 Android Studio 2.2.3。请尽可能提供帮助。我已经在 Stack Overflow 中两次问过这个问题,但我认为这是最详细的问题,所以请帮忙。
最佳答案
我之前遇到过类似的问题。
我按照这些步骤解决了这个问题。您也可以尝试这些,其中任何一个都可能帮助您解决您的问题:
1.尝试升级你的 android studio 的 android 模拟器,它可以在
文件>>设置>>外观&行为>>Android SDK 或者点击SDK管理器。
然后单击 SDK 工具选项卡。
然后单击 Android 模拟器选项并安装/更新它。 (同样,您也可以尝试升级 Android sdk 工具和 Android SDK 平台工具,因为它可能以一种或另一种方式帮助您)。现在尝试运行您的模拟器。
2.尝试关闭windows-firewall。然后尝试运行你的模拟器。
3.确保您PC中安装的其他VIRTUAL BOX docker不会影响您的android模拟器运行。
4.我觉得这是要检查的最重要的事情。
您的 PC 中可能安装了防病毒软件。
检查这些防病毒软件是否在访问您 PC 中的本地端口 TCP 时不阻止“ADB.exe”和“qemu-system-i386.exe”。当这些要求访问“允许”时,然后尝试运行模拟器。
(我在我的电脑上安装了 K7。我重新安装了 android studio,然后尝试运行模拟器。当时它要求我允许“允许”或“阻止”访问 TCP。)
Try these out and any one of these steps might help you in solving the problem.:-)
关于android - 我在尝试运行 Android 虚拟设备时收到错误列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41669097/