Android Studio 与模拟器失去连接

Mic*_*551 5 android android-emulator android-studio

最近我在设置 Android Studio 和模拟器时遇到了问题。我将 Windows 和 Nvidia 驱动程序更新到最新版本,很幸运能够使其再次部分“工作”。我仍然遇到与 Android Studio 捆绑在一起的 Android 模拟器的问题。

问题

当我长按控制模拟器时,我遇到了模拟器崩溃的问题。例如:

  • 拖动项目
  • 滚动
  • 旋转相机

在这些情况下,Android Studio“关闭”模拟器并显示“No Running Emulators”。我不认为模拟器本身已经崩溃,因为在我从模拟器窗口中丢失日志后,我可以在 Logcat 中看到几秒钟的日志,但过了一会儿模拟器就断开了连接。

有时出现此问题后,我无法在模拟器中拖动/滑动,只能单击。如果我不拖动/滑动模拟器似乎运行稳定

这是一些日志。问题发生于2022-02-18 15:48:28,863

2022-02-18 15:38:56,436 [ 310476]   INFO - manager.EmulatorProcessHandler - Emulator: C:\Users\Nonko\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: icmpv6 ICMP6_ECHO_REQUEST failed 
2022-02-18 15:40:15,045 [ 389085]   WARN - com.intellij.util.xmlb.Binding - no accessors for com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginAdvertiserExtensionsStateService$State 
2022-02-18 15:40:15,045 [ 389085]   WARN - com.intellij.util.xmlb.Binding - no accessors for com.intellij.openapi.updateSettings.impl.pluginsAdvertisement.PluginAdvertiserExtensionsStateService$State 
2022-02-18 15:48:07,459 [ 861499]   INFO - manager.EmulatorProcessHandler - Emulator: WARNING | getAttribLocation: Program attrib 'in_uv' not found 
2022-02-18 15:48:07,461 [ 861501]   INFO - manager.EmulatorProcessHandler - Emulator: WARNING | getAttribLocation: Program attrib 'in_uv' not found 
2022-02-18 15:48:19,278 [ 873318]   INFO - rationStore.ComponentStoreImpl - Saving Project(name=yForce, containerState=COMPONENT_CREATED, componentStore=C:\Users\Nonko\Documents\Sources\yForce-android)Kotlin2JvmCompilerArguments took 23 ms 
2022-02-18 15:48:28,863 [ 882903]   WARN - ea.emulator.EmulatorController - android.emulation.control.EmulatorController/streamNotification call failed - UNAVAILABLE: Endpoint read failed 
2022-02-18 15:48:28,863 [ 882903]   WARN - ea.emulator.EmulatorController - android.emulation.control.EmulatorController/streamClipboard call failed - UNAVAILABLE: Endpoint read failed 
2022-02-18 15:48:28,863 [ 882903]   WARN - ea.emulator.EmulatorController - android.emulation.control.EmulatorController/streamScreenshot call failed - UNAVAILABLE: Endpoint read failed 
2022-02-18 15:48:28,863 [ 882903]   INFO - ea.emulator.EmulatorController - Disconnected from Pixel 2 API 30 (5554) 
2022-02-18 15:49:30,541 [ 944581]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Shutting down gRPC endpoint 
2022-02-18 15:49:30,541 [ 944581]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Shutting down gRPC endpoint 
2022-02-18 15:49:31,091 [ 945131]   INFO - b.PhysicalDeviceChangeListener - emulator-5554 state changed to OFFLINE 
2022-02-18 15:49:31,092 [ 945132]   WARN -            #com.android.ddmlib - Failed to start monitoring emulator-5554 
2022-02-18 15:49:31,140 [ 945180]   INFO - manager.EmulatorProcessHandler - Emulator: INFO    | Android emulator version 31.2.8.0 (build_id 8143646) (CL:N/A) 
2022-02-18 15:49:31,140 [ 945180]   INFO - manager.EmulatorProcessHandler - Emulator: Process finished with exit code 0 
2022-02-18 15:49:31,354 [ 945394]   INFO - id.tools.idea.ddms.DevicePanel - Device disconnected: emulator-5554 
2022-02-18 15:49:31,354 [ 945394]   INFO - b.PhysicalDeviceChangeListener - emulator-5554 disconnected 
Run Code Online (Sandbox Code Playgroud)

崩溃示例

眼镜

  • i7-9750h
  • 16GB 内存
  • RTX 2060 配备 511.79 个驱动程序
  • Windows 11 企业版 21H2 22000.527 Windows 功能体验包 1000.22000.527.0
  • Android Studio 2021.1.1.1 补丁 1
  • 模拟器31.2.8
  • 平台工具 32
  • 尝试了多个图像 - 它们都不起作用

小智 6

我通过关闭“设置”->“工具”->“模拟器”下的“在工具窗口中启动”设置来解决这个问题。模拟器在单独的窗口中启动,但您可以滚动。