How to change the android emulator RAM size from the command line?(如何从命令行更改 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 大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何从命令行更改 android 模拟器 RAM 大小?


- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01