2

hi im new to to android studio and programming. i wrote a simple hello world program, when i click on run and select the default avd device it gives me the following error

"D:\Users\Brian Fernandes\AppData\Local\Android\sdk\tools\emulator.exe" -avd Nexus_5_API_21_x86 -netspeed full -netdelay none
emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.
Cannot set up guest memory 'android_arm': Invalid argument
Error accepting connection, aborting

i reduced the ram now i get the below error

Cannot launch AVD in emulator. Output: emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!

i have installed haxm yet its giving me this error

Help me resolve the error.

Brian
  • 159
  • 2
  • 5
  • 16

3 Answers3

1

First reduce the size used by this emulator, or try to use an other emulator system image with minimal config to test your Hello Android application.

I advice you to use an Android powered device later when you get ready and when u're a ninja android developer :)

issamux
  • 1,336
  • 1
  • 19
  • 35
0

Personally I've had a lot of problems with AVD emulators. I'd try out genymotion as an alternative. https://www.genymotion.com/#!/ This is what I use for all my android development and it's never given me any errors and is faster than avd.

Tulsi Leathers
  • 328
  • 1
  • 10
  • i have core 2 duo e7400 . does it support Vt-x? which CPU do you have? – Brian May 01 '15 at 18:58
  • It does support vt-x, see here https://www.genymotion.com/#!/developers/user-guide#requirements but it also apparently requires 2gb ram. So you should be okay to run it. The answers suggesting you decrease the size of the emulator and suggesting you get a real test device are also valid. You can pick up a used android new enough to test on for pretty cheap ebay etc. – Tulsi Leathers May 02 '15 at 15:31
  • Hmm you can try another emulator and see if you get better results would be only suggestion then. In addition to genymotion there is bluestacks and andy but I haven't used either of them. – Tulsi Leathers May 02 '15 at 22:46
  • only some models of core 2 duo support vtx mine doesnt. looks like even vtx requires vtx. also tried using arm image. but it just gives me a blank white screen – Brian May 16 '15 at 09:46
  • https://software.intel.com/en-us/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows – Cristiana Chavez Jul 16 '15 at 07:31
0

Reduce the RAM for emulator in between 512 MB to 1 GB.

In a Windows environment you cannot use more than 1 GB of ram for emulator.

Harsh Dattani
  • 2,109
  • 1
  • 17
  • 27