0
votes

Build was successful but when I tried to run the project using AVD, it shows the following message. I'm not sure what went wrong.

Warning: No DNS servers found

emulator: device fd:608

HAXM is not working and emulator runs in emulation mode

emulator: The memory needed by this AVD exceeds the max specified in your HAXM configuration.

emulator: AVD RAM size = 1536 MB

emulator: HAXM max RAM size = 512 MB

emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.

creating window 43 59 329 583 emulator: UpdateChecker: skipped version check

3
when you create your emulator then set its RAM size as <= 512MBBhunnu Baba

3 Answers

2
votes

You need to adjust your adb ram size.

First open android studio.Then at the top icon bar you can find this adb_icon icon.Click it.This will open all available virtual device you have.Select your virtual device and at the right you can find this icon edit_icon.Click it.This will open a new window.At the bottom of this window you can find this enter image description here.Click it.Then there will be a section like this section.Then change RAM size 1536 to 512.Like this edit_ram_size.Now click finish and run your application.

Edit:

If your target api is upper than 19 then you need to adjust your haxm installer ram size because when you run your app the avd ram size will increase to 1 GB. So how to adjust your haxm installer ram size.Follow the step mentioned below.

If you install android studio by it's default position then you can find haxm installer in this locaiton 'C:\Users\Niyamat\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager'

Go to this location(make sure you change userName Niyamat to your username).Click "intelhaxm-android" and run it.Then an alert dialog pop up like this enter image description here click yes.Then click Next.And finally click Set manually.and remove 512 and add 1024.Something like this enter image description here.Then click next then install.Wait few seconds for install.And that's it.I think now you can run your app on your virtual device. Hope this help!

1
votes

HAXM RAM size should be more than AVD. Better decrease the RAM size of AVD by editing the emulated device or the other way increase HAXM RAM size.

1
votes

HAXM RAM size should be more than AVD. Decrease the RAM size of AVD or increase HAXM RAM size.

To reduce ram of avd (Wich I recommend)

Go to your avd manager. Delete the emulator and create a new one. However for the new one make sure it's ram is less than 512 mb.