gpt4 book ai didi

android - 为什么我不能使用 1024 MB RAM 从 Eclipse 启动 AVD?

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:04:18 25 4
gpt4 key购买 nike

因此,就像许多使用 Eclipse 开始 Android 开发的人一样,即使机器速度很快,我也注意到模拟器的运行速度慢得令人沮丧。

我在 SO 中搜索任何让它运行得更快的技巧,然后我遇到了 this question ,其最佳答案提出了一些建议,包括使 AVD 具有更多 RAM。他们建议 1024MB:

enter image description here

听起来不错。但是当我尝试启动它时,我得到了这个:

Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

如果我将其设置为 512MB(高于默认的 256MB),它可以正常启动。

但是,为什么在具有 12GB 物理 RAM 的 Windows 7 x64 机器上我不能为 AVD 分配 1024MB?这是 Eclipse 的限制吗?模拟器限制? Java 限制?我假设另一个问题中的人让它工作,但我还没有弄清楚我在其他地方看到的大多数回复是如何说“是的,将其调低到 512MB”,这不是我正在寻找的答案。

最佳答案

来自 Galaxy s3 emulator :

设置 AVD 时有一个常见问题,您必须手动编辑配置文件才能修复。文件位于 C:\Documents and Settings\username\.android\avd\name_of_avd.avd\config.ini

从中更改内存设置

hw.ramSize=1024

hw.ramSize=1024MB

(不要在记事本中启用自动换行)。

保存文件并重新打开 avd。这对我有用。

关于android - 为什么我不能使用 1024 MB RAM 从 Eclipse 启动 AVD?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8853541/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com