即使进行了所有优化,Android 模拟器仍然滞后 [英] Android Emulator laggy even with all optimizations

查看:22
本文介绍了即使进行了所有优化,Android 模拟器仍然滞后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • HAXM Enabled 7.1.0 版,我验证了它在模拟器运行时可以正常工作
  • 模拟器使用的是 Nvidia GPU,但在任何给定时间它几乎都不会使用最多 7% 的 GPU
  • 我有 27.3.1 的模拟器版本(最新)
  • 尝试过 x86 图像和 x86_x64 图像
  • 我尝试过硬件加速
  • 我尝试过软件加速
  • 我将模拟器内存​​提升到 4GB(我有 20GB)
  • 我将模拟器 CPU 优先级设置为实时
  • 我只有 Android Studio 和正在运行的模拟器
  • 模拟器运行非常缓慢和滞后,甚至在从活动转到另一个活动时出现黑屏
  • 一直以来都是如此
  • 我尝试删除整个 Android SDK 并从头开始安装
  • 我在 BIOS 中启用了英特尔虚拟技术
  • 我尝试过 Google Apis 与没有 Google Apis 模拟器
  • 我尝试了 Nexus 5、X、Pixel 1、2、XL 和 android P、O、16 和所有滞后

推荐答案

这对我的 Android 9 模拟器有帮助:

This is what helped me with my Android 9 emulator:

  1. 使用 Google Play x86 图像而不是 Google API x86 图像,因为前者有一条通知准备安装..",但从未完成.

  1. Use Google Play x86 image instead of Google API x86 image, because the former had a notification "Preparing for setup.." which never finished.

首次启动模拟器后,完成初始谷歌设备设置(跳过可以跳过的内容..)并设置 SD 卡(作为外部存储).

After launching the emulator first time, going through the initial google device setting (skipping what can be skipped..) and setting up the SD card (as an external storage).

如果有一些应用更新正在运行,请等待,然后强制退出Google Play 服务"应用.如果模拟器在重启后再次变慢,您可能希望在每次启动后执行此操作.

If there are some app updates running, wait for it and then force quit 'Google play services' app. If the emulator will be slow again after reboot, you might want to do this after every launch.

在设置中禁用移动数据,因为它一次又一次地尝试连接,耗尽所有 CPU.CPU 有助于渲染,所以如果没有可用的 CPU,它会变慢.

5.转到模拟器设置/高级并将 OpenGL ES 渲染设置为 Desktop native OpenGL 和 OpenGl ES API 级别到Renderer maximum 并重新启动模拟器. 在我的情况下,使用自动选择/自动检测的性能要差得多.

5. Go to emulator Settings/Advanced and set OpenGL ES rendered to Desktop native OpenGL and OpenGl ES API level to Renderer maximum and reboot the emulator. In my case, using autoselect/autodetect had far worse performance.

这篇关于即使进行了所有优化,Android 模拟器仍然滞后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆