简体   繁体   English

Android 模拟器上的低 FPS

[英]Low FPS on Android emulator

First of all, you need to know that I have a very powerful computer so that's not the problem.首先,你需要知道我有一台非常强大的电脑,所以这不是问题。

I tried making a black screen without anything on it but an FPS counter, with OpenGL and Canvas, but the app doesn't go over 10-11 FPS.我尝试使用 OpenGL 和 Canvas 制作黑屏,除了 FPS 计数器外什么都没有,但该应用程序不会超过 10-11 FPS。

I am just lost, I don't know what the problem is, I checked and it's not the render or the update function...我只是迷路了,我不知道问题是什么,我检查了一下,它不是渲染或更新功能......

thanks for the help.谢谢您的帮助。

I am on windows 7 64 bit BTW.我在 Windows 7 64 位顺便说一句。

8 years later and i have the answer. 8 年后,我有了答案。

open the AVD manager, scroll down to emulated performance, change it from "Automatic" to "Hardware - GLES 2.0", if still not performing show the advanced settings and set it to "Cold boot" this changed it from like 8-12 fps to a solid 30 fps non stop.打开 AVD 管理器,向下滚动到模拟性能,将其从“自动”更改为“硬件 - GLES 2.0”,如果仍未执行,请显示高级设置并将其设置为“冷启动”,这将其从 8-12 fps 更改为到稳定的 30 fps 不间断。

I'm more inclined to say that it is a fault of the Emulator than your system.我更倾向于说这是模拟器的错误而不是您的系统。 It is extremely slow for me as well, even doing general app debugging.这对我来说也非常慢,即使是进行一般的应用程序调试也是如此。 Not surprised on your frame rate.对你的帧率并不感到惊讶。 The Intel x86 Image might make a difference, but I usually don't see much improvement even with that. Intel x86 Image 可能会有所不同,但即使这样我通常也看不到太大的改进。

You can create x86 virtual machine.您可以创建 x86 虚拟机。 See

Android-x86 - Porting Android to x86 Android-x86 - 将 Android 移植到 x86

ISO image ISO 图像

I've found that I get better performance out of the Emulator when I set the processor afinity to all through Windows Task Manager我发现当我通过 Windows 任务管理器将处理器亲和性设置为全部时,我可以从模拟器中获得更好的性能

Here are some tips which can speed up the emulator significantly:以下是一些可以显着加快模拟器速度的技巧:

  • Give 1GB of RAM (or even more) to your AVD.为您的 AVD 提供1GB 的 RAM (或更多)。 Don't try to emulate the amount of RAM of a real device, it is generally useless and can amazingly slow down the emulator.不要试图模拟真实设备的 RAM 量,它通常是无用的,而且会惊人地减慢模拟器的速度。
  • Emulate Android 2.3.3 , which boots and runs faster on the emulator than the previous and next versions (by the way, never emulate Android 2.1 or 2.2 if you use SQLite databases. The SQLite implementation was very slow even on real devices).模拟 Android 2.3.3 ,它在模拟器上的启动和运行速度比之前和下一个版本更快(顺便说一下,如果您使用 SQLite 数据库,请不要模拟 Android 2.1 或 2.2 。即使在真实设备上,SQLite 实现也非常慢)。
  • Don't use high screen resolutions and densities unless for final testing.除非进行最终测试,否则不要使用高屏幕分辨率和密度 Use the smallest resolution available and set the LCD density to something low (in the mdpi range).使用可用的最小分辨率并将 LCD 密度设置为较低的值(在 mdpi 范围内)。

Well, this might not be an alternative for everyone but for me it's perfect!嗯,这可能不是每个人的替代品,但对我来说它是完美的! Use the Bluestacks Player .使用Bluestacks 播放器 it runs Android 2.3.4 and is very fluent and fast.它运行 Android 2.3.4 并且非常流畅和快速。 Sometimes even faster than a normal device.有时甚至比普通设备更快。 The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not.唯一的缩减是,您可以只在 API 级别 10 和一个屏幕尺寸上测试应用程序,但它非常适合测试它是否工作。 Just connect the Player with the adb by running只需通过运行将播放器与adb连接起来

adb connect 127.0.0.1 

(Its always the same IP adress) (它始终是相同的 IP 地址)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM