简体   繁体   中英

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?

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.

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.

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.

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

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.

I had the same problem, what helped was reboot my computer and start the emulator with only a few programs open (Eclipse, Chrome and nothing more). My development computer is a 4 GB notebook with integrated graphics running Ubuntu 12.04. Nothing fancy, and the KitKat emulator works. Very slowly, as expected :(, but works.

Take into account that emulators are memory hungry, perhaps your development machine is low on resources when you try to run them?

Mine gets sigabort on surface flinger unless I enable "Use Host GPU".

EDIT: Seems this is related to extreme resolutions. Try using lower resolution... if You do use res like 1080x1920 - enabling Host GPU works for me

Check adb logcat output from emulator while booting, if yours is similar it might work.

Please find log below...

I/Vold    (   46): Vold 2.1 (the revenge) firing up
I/Netd    (   48): Netd 1.0 starting
D/Vold    (   46): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
W/InterfaceController(   48): Warning (dlopen failed: library "/system/lib/libnetcmdiface.so" not found) while opening the net interface command library
I/SurfaceFlinger(   51): SurfaceFlinger is starting
I/SurfaceFlinger(   51): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  (   51): Emulator without GPU support detected. Fallback to software renderer.
D/libEGL  (   51): loaded /system/lib/egl/libGLES_android.so
D/gralloc_goldfish(   51): Emulator without GPU emulation detected.
E/SurfaceFlinger(   51): hwcomposer module not found
E/SurfaceFlinger(   51): ERROR: failed to open framebuffer (No such file or directory), aborting
F/libc    (   51): Fatal signal 6 (SIGABRT) at 0x00000033 (code=-6), thread 51 (surfaceflinger)
I/DEBUG   (   49): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (   49): Build fingerprint: 'generic/sdk/generic:4.4.2/KK/986172:eng/test-keys'
I/DEBUG   (   49): Revision: '0'
I/DEBUG   (   49): pid: 51, tid: 51, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   (   49): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG   (   49):     r0 00000000  r1 00000033  r2 00000006  r3 00000000
I/DEBUG   (   49):     r4 00000006  r5 00000002  r6 00000033  r7 0000010c
I/DEBUG   (   49):     r8 b6fd084d  r9 b7f1552c  sl 00000000  fp bef71b9c
I/DEBUG   (   49):     ip fffffffe  sp bef719e8  lr b6f34ead  pc b6f43e20  cpsr 00000010
I/DEBUG   (   49):     d0  0036f09323cb6394  d1  0000000000000000
I/DEBUG   (   49):     d2  0000000000000000  d3  0000000000000000
I/DEBUG   (   49):     d4  0000000000000000  d5  41c1e5b1ca000000
I/DEBUG   (   49):     d6  3f50624dd2f1a9fc  d7  414b7849ee147ae1
I/DEBUG   (   49):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (   49):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (   49):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (   49):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (   49):     scr 00000010
I/DEBUG   (   49): 

Having had the same problem, I configured AVD to use 516MB of RAM and it loaded ok. Hope this helps you or someone else.

The biggest problem with the SDK right now is that there is no x86 emulator image posted.

However, I did get a KitKat x86 emulator working in Windows by hacking together INIs from an x86 JB AVD and an ARM KitKat AVD, as well as building aosp_x86-eng and copying over the prebuilt QEMU kernel for x86 from the KitKat AOSP into my Windows host. An x86 KitKat image running in Windows with the HAXM extensions is very fast, as fast or faster than running on actual hardware, particularly with "Use host GPU" enabled.

If you're not building Android itself, this probably doesn't help you. But if you ARE building AOSP (or you can find a prebuilt x86 KitKat Android image and QEMU kernel online), I can post additional details on how to get it working in Windows.

This might have been answered ...but I had an issue and it got solved...please see this post and I am sure you will hit it correct: Setting Up Android 4.4 kitkat emulator

Let me know if it works...

I had the same issue. Updating Intel HAXM Accelerator from 1.0.1 to 1.0.8 (current release) did the trick for me.

I had similar issues on a Windows Server 2012 R2 installation. The root cause was a missing video driver (the vanilla Microsoft one wasn't enough). I was working with a cobbled-together frankenbox and found it useful to follow the instructions on finding the right driver here:

http://support.amd.com/en-us/kb-articles/Pages/HowtoidentifythemodelofanATIgraphicscard.aspx#DID

Once I had the right drivers the emulator started up just fine...

Firstly go to SDK manager plugin of Your IDE and choose the API level for which you are going to create Android Virtual Device. And make sure that API's SDK Platform is installed. If SDK showing Not installed , then firstly download it.

After automatic Installation on Downloading completion. Restart your IDE . Start your AVD plugin and then select the API for your AVD that you download.

In my case, the solution was to switch to a different system image. I was using the Atom x86_64 one, and as soon as I switched to Atom x86, the emulator worked perfectly.

I think there is a bug in system image of Intel x86(Kitkat). Because it happens only with -partition-size and -memory option to use more than 256MB stroage and memory.

So I've change the system image, there is two system images for kitkat, one is Intel x86 Atom system image and the other is Google APIs(x86 system image). For me it does not happen with Google APIs image.

Use command line once, and then it will work normally from the Studio as well:

emulator -avd ExampleVDName -debug-all -noaudio -nocache -wipe-data -dns-server 8.8.8.8

Before using this, don't forget to navigate to the tools directory. You need to know where your SDK is located. In my case, I had to navigate to this directory first, and then use the command above.

cd C:\\AndroidSDK\\tools

Ps: don't forget to use the name of your own Virtual Device, instead of ExampleVHDName .

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