Not able to run the Android Emulator

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


You need to adjust your adb ram size.

First open android studio.Then at the top icon bar you can find this 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 .Click it.This will open a new window.At the bottom of this window you can find this .Click it.Then there will be a section like this .Then change RAM size 1536 to 512.Like this .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:UsersNiyamatAppDataLocalAndroidsdkextrasintelHardware_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 click yes.Then click Next.And finally click Set manually.and remove 512 and add 1024.Something like this .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!


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.


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.

链接地址: http://www.djcxy.com/p/90522.html

上一篇: 无法分配内存:8

下一篇: 无法运行Android模拟器