位图大小超过上模拟器VM预算错误而不是设备上 [英] Bitmap Size Exceeds VM Budget Error on Emulator but Not on Device

查看:217
本文介绍了位图大小超过上模拟器VM预算错误而不是设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到上述错误,每当我在模拟器上测试,但不是我测试的任何设备。任何人都可以说明为什么这件事会发生?

I am getting the above error whenever I test on an emulator, but not any devices I have tested on. Can anyone suggest why this might happen ?

推荐答案

您是在可能有32MB以上堆大小的内存高调设备可能测试。仿真器可以使用24MB,这就是原因是崩溃。

You are probably testing on high profile devices that might have 32Mb or more heap size memory. The emulator could be using 24Mb and that's the reason is crashing.

进入AVD(Android虚拟设备)编辑器,增加最大VM应用程序堆大小到你的虚拟设备的硬件性能。该值设置为32Mb的,并重新启动模拟器。

Go to the AVD (Android Virtual Device) editor, and add "Max VM application heap size" to your virtual device hardware properties. Set that value to 32Mb and reboot your emulator.

这应该够了。

如果您想了解更多关于堆内存,我建议你读<一个href=\"http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android\">this问题。

If you want to learn more about heap memory I recommend you to read this question.

这篇关于位图大小超过上模拟器VM预算错误而不是设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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