Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulator for Android 4.4 KitKat is not starting

I am creating an emulator for Android 4.4 KitKat, but the emulator takes very long and isn't starting. I tried many devices like Nexus4, Galaxy Nexus, Nexus S etc. but none of that worked. Just a black screen with the android logo for long time. Any suggestions?

like image 242
FIXI Avatar asked Nov 18 '13 15:11

FIXI


5 Answers

Unfortunately the emulator does take a very long time to load. A regular complaint amongst Android developers.

It sometimes helps if you go into the AVD configuration and modify your KitKat emulator and tick the checkbox that says Use Host GPU. This makes it slightly faster.

Also I've found that if you use the default RAM space that it decides, usually over 1000, it takes a stupidly long time, if it loads up at all. I usually set mine to 512MB, 700+MB at a push but reducing the amount of RAM that the emulator can have helps.

There is also a different emulator you can use, although it currently doesn't yet support KitKat, although they say its coming soon, I've heard quite a few positive comments.

You can find the alternative emulator at http://www.genymotion.com/

UPDATE

Google have released a new version of the Android Emulator with Android Studio 2. Unfortunately, AS, the build tools and the emulator are in Beta/Release Candidates but I've been using them for a while for my own apps and had no problems, but also found that the emulator is much improved from the old one. http://tools.android.com/tech-docs/emulator will show you what's new and how to get the new emulator.

like image 109
Boardy Avatar answered Oct 23 '22 06:10

Boardy


To find what the problem exactly is, try to run emulator with -debug-all. In my case emulator freezed after:

$./emulator -avd 4.4 -partition-size 1024 -debug-all
emulator: found SDK root at ~/data/develop/android/android-sdk-linux
…blah-blah-blah…
emulator: qpa_audio_init: entering
and -noaudio option solved the problem.
like image 29
sendevent Avatar answered Oct 23 '22 05:10

sendevent


It may help to start the first run of the emulator with a very small amount of memory (say 200mb)

On my machine the emulator refused to start (I waited 30 minutes and then killed it) with 700MB It just showed a blank screen - not even the Android message.

When I reduced the memory to 128MB the emulator fired up in the normal time (about 50 seconds on my m/c) but had insufficient RAM to load the background apps. I changed it to 256 MB and everything burst into life. Now I can change the memory up to 768MB it now loads fine in the same timeframe.

Seems like the first run needs to be with a small(er) amount of memory but once that has succeeded you can increase them memory (up to 768MB on Windows) without a problem.

like image 7
Richard Avatar answered Oct 23 '22 07:10

Richard


I had the same problem with ...

The solution that worked for me with x86 emulator was to update HAXM with the last version and to restart my computer.

http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager

I hope it will help and solve the problem for many of you.

Regards

like image 2
Mory Avatar answered Oct 23 '22 05:10

Mory


Maybe ADB is kaput!

If you're using Windows to develop Android, then open a DOS session at \android-sdk\platform-tools\ directory (Note: This is a sub-directory of the Android SDK installation).

At the DOS window, type:

adb kill-server

This would kill the current Android Debug Bridge (ADB). Then, start it again by typing:

adb start-server

To verify if your Android 4.4 KitKat emulator is running, type:

adb devices

If it still doesn't work, repeat the above steps. Else, restart your IDE (Eclipse, Android Studio, etc) and try again.

like image 1
ChuongPham Avatar answered Oct 23 '22 05:10

ChuongPham