简体   繁体   中英

Cannot start AVD in Android Studio error in HAXM

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. ;)

在此处检查答案https://android.stackexchange.com/questions/124089/avd-is-not-able-to-launch您需要将分配给虚拟设备的ram减小到小于1gb

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.

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 .

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM