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

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

问题描述

我想在从命令行创建 android 模拟器时编辑或更改内存大小.

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

emulator"是我创建 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,并添加了内存大小参数.

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

有关您可以添加的参数列表,请参阅:从命令行管理 AVD

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

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

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