0

我做了这个温度转换器应用程序,代码很完美。但是每当我运行 AVD 时,它都会显示以下错误:

[2012-06-05 12:22:58 - Emulator] Failed to allocate memory: 1455
[2012-06-05 12:22:58 - Emulator] 
[2012-06-05 12:22:58 - Emulator] This application has requested the Runtime to terminate it in an unusual way.
[2012-06-05 12:22:58 - Emulator] Please contact the application's support team for more information.
4

1 回答 1

0

解决方案1:

根据 Calvin 在 techarena 论坛上的指示,我已经证明了最佳和正确的解决方案。

  • 单击开始,单击运行,在打开框中键入 sysdm.cpl,然后按 Enter。
  • 单击高级选项卡,然后在性能下单击设置。
  • 单击高级选项卡,然后在虚拟内存下单击更改。
  • 在 Drive [Volume Label] 下,单击包含要更改的页面文件的驱动器。
  • 在所选驱动器的分页文件大小下,单击自定义大小,在初始大小 (MB) 或最大大小 (MB) 框中键入新的分页文件大小(以兆字节 (MB) 为单位),然后单击设置。
  • 单击确定关闭对话框并应用更改。

这种常见的错误“无法分配内存:1455”将由Virtual Memory alocation引起。这样解决了根 C 盘的虚拟内存分配问题后,你应该在 Eclipse 的控制台中阅读以下内容:

[2011-11-27 12:33:06 - Videotutorial1] ------------------------------
[2011-11-27 12:33:06 - Videotutorial1] Android Launch!
[2011-11-27 12:33:06 - Videotutorial1] adb is running normally.
[2011-11-27 12:33:06 - Videotutorial1] Performing com.videotutoriales.videotutorial1.Videotutorial1Activity activity launch
[2011-11-27 12:33:06 - Videotutorial1] Automatic Target Mode: Preferred AVD 'VtAVD' is not available. Launching new emulator.
[2011-11-27 12:33:06 - Videotutorial1] Launching a new emulator with Virtual Device 'VtAVD'
[2011-11-27 12:33:39 - Emulator] emulator: emulator window was out of view and was recentered
[2011-11-27 12:33:39 - Emulator]
[2011-11-27 12:33:45 - Videotutorial1] New emulator found: emulator-5554
[2011-11-27 12:33:45 - Videotutorial1] Waiting for HOME ('android.process.acore') to be launched...
[2011-11-27 12:38:19 - Videotutorial1] HOME is up on device 'emulator-5554'
[2011-11-27 12:38:19 - Videotutorial1] Uploading Videotutorial1.apk onto device 'emulator-5554'
[2011-11-27 12:38:20 - Videotutorial1] Installing Videotutorial1.apk...
[2011-11-27 12:40:52 - Videotutorial1] Success!
[2011-11-27 12:40:53 - Videotutorial1] Starting activity com.videotutoriales.videotutorial1.Videotutorial1Activity on device emulator-5554
[2011-11-27 12:41:18 - Videotutorial1] Attempting to connect debugger to 'com.videotutoriales.videotutorial1' on port 8628

解决方案2:

打开 Android Virtual Device Manager 并将设备内存大小的值添加或更改为 15 或更小或更高的值:

在此处输入图像描述

于 2012-06-05T09:12:28.317 回答