How to change the android emulator RAM size from the command line?

前端 未结 3 1368
感动是毒
感动是毒 2020-12-06 02:25

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

EX: While creating the emulator it\'s taking default ram size(Android S

3条回答
  •  佛祖请我去吃肉
    2020-12-06 02:51

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

    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" was the name I provided when I created the AVD, so the directory name will depend on what you provided.

    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/
    

    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

提交回复
热议问题