2

Android x86 ( API-10 ) 模拟器似乎不遵守通过 AVD 管理器指定的 VM 大小。有关从 AVD 管理器创建的 config.ini,请参见下文

hw.lcd.density=240
sdcard.size=64M
skin.name=WVGA800
skin.path=add-ons/addon-intel_atom_x86_system_image-intel_corporation-10/skins/WVGA800
hw.cpu.arch=x86
abi.type=x86
hw.keyboard=yes
vm.heapSize=96
hw.ramSize=256
image.sysdir.1=add-ons/addon-intel_atom_x86_system_image-intel_corporation-10/images/x86/

当我启动应用程序时,我打印出 maxmemory 和一些细节正在使用它:

Runtime rt = Runtime.getRuntime();
long maxMemory = rt.maxMemory();
Log.v("onCreate", "maxMemory:" + Long.toString(maxMemory));
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
int memoryClass = am.getMemoryClass();
Log.v("onCreate", "memoryClass:" + Integer.toString(memoryClass));

这给了我

10-12 17:07:53.817: VERBOSE/onCreate(222): maxMemory:25165824
10-12 17:07:53.827: VERBOSE/onCreate(222): memoryClass:24

使用 Ubuntu 12.04,SDK 工具 20.0.3,平台工具 14。

4

0 回答 0