如何从命令行更改android仿真器RAM大小? [英] How to change the android emulator RAM size from the command line?

查看:74
本文介绍了如何从命令行更改android仿真器RAM大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在从命令行创建android仿真器时编辑或更改ram大小.

I want to edit or change the ram size while creating the android emulator from command line.

EX:在创建模拟器时,它将采用默认的内存大小(Android SDK 4.0.3)512 MB 但我想将其增加到768MB或减少到256MB.

EX: While creating the emulator it's taking default ram size(Android SDK 4.0.3) 512 MB But I want to increase it to 768MB or decrease it to 256MB.

我只想更改Ram的大小.因为可以选择更改Ram的大小.

I want to change only Ram size. Because there is an option to change the Ram size.

 Do you wish to create a custom hardware profile [no] Yes

如果您输入是,我们需要提供很多东西.

If you entered yes, we need to provide so many things.

推荐答案

您需要找到已创建的AVD的配置文件.

You need to find the config file for the AVD that you have created.

就我而言,我正在Ubuntu上运行AVD,因此这是我找到配置文件的地方.

In my case, I'm running the AVD on Ubuntu, so this is where I found the config file.

~/.android/avd/emulator.avd/config.ini

模拟器"是我在创建AVD时提供的名称,因此目录名称将取决于您提供的名称.

"emulator" was the name I provided when I created the AVD, so the directory name will depend on what you provided.

以下是config.ini文件中的内容:

The following is what is inside the config.ini file:

hw.lcd.density=240
skin.name=WVGA800
skin.path=platforms/android-8/skins/WVGA800
hw.cpu.arch=arm
abi.type=armeabi
vm.heapSize=64
hw.ramSize=1024
image.sysdir.1=platforms/android-8/images/

我将堆大小从24增加到64,并添加了ram size参数.

I increased my heap size from 24 to 64, and added the ram size parameter.

有关您可以添加的参数列表,请参阅:

For the list of parameters you can add, refer to: Managing AVDs from the Command-line

这篇关于如何从命令行更改android仿真器RAM大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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