0

I am new to Android Development and starting with React Native.

After changing ram size via intelhaxm-android.exe to 1.5GB and running AVD its not working and i'm getting this

`>"C:\Program Files\Android\android-sdk\tools\emulator.exe" -netdelay none -netspeed full -avd Nexus_5_API_23`

`>emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.`

`>emulator: device fd:784`
`>HAXM is working and emulator runs in fast virt mode`
`>Cannot set up guest memory 'pc.ram': Invalid argument`

What to do now?

Thank you. ;)

Hiren
  • 613
  • 1
  • 8
  • 25

4 Answers4

1

check the answer here https://android.stackexchange.com/questions/124089/avd-is-not-able-to-launch You need to reduce the ram allocated to the virtual device to less than 1gb

Community
  • 1
  • 1
1

Clearly error says:

WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.`

Which means, you should change the values to 1GB(1024mb) or less than 1GB memory.

Sajib Acharya
  • 1,666
  • 5
  • 29
  • 54
ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
1

The error shown is explanatory enough. The amount of RAM you are allocating to the AVD is not available to the AVD during runtime. This depends on the amount of RAM you actually have on your machine. Lower the amount of virtual RAM from 1.5GB to around 0.5GB for your AVD from your AVD settings. Though these settings depend on your need. If you are running Android Studio, official requirements are that you need 4GB minimum to run Android Studio itself. So, you'd need to have atleast 6GB RAM if you want to smoothly run AVD on your machine. But you can always mix and match to see what works best for you.

FYI, your question has nothing to do with HAXM or react-native.

Sajib Acharya
  • 1,666
  • 5
  • 29
  • 54
  • I am using Android Studio Just for emulator. I have tried to install Genymotion first but the VM box didn't worked, showing errors about kernel. So i switched to Android Studio for that. Is there any good solution other than Andoid Studio for emulating a Android device.? – Hiren Jan 24 '16 at 09:40
  • @Hiren, I find AVD to be easiest. But that's just me. You do not need Android Studio explicitly to use AVD. They are different things. You can run the AVD using the terminal/command line too. You could fire AVD through Android Studio at the click of a button, or create new AVDs through a GUI. But that's just it. The important thing you need to run emulators is more RAM, be it the native AVD or any third-party like Genymotion. What is your system configuration? – Sajib Acharya Jan 24 '16 at 10:07
1

Reduce RAM size of your emulator and you will be back to business again.

launch Android Studio and do as follow:

1.launch Avd manager
2.Edit the settings for AVD configuration
3.Click in the Show Advanced Settings
4.In the Memory and Storage section, reduce the RAM size (eg. to 512 MB)
ishwor kafley
  • 938
  • 14
  • 32