Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
606 views
in Technique[技术] by (71.8m points)

AVD Emulator stuck on loading screen in Android Studio

I decided to try Android Studio 2.0 having used Eclipse in the past but I'm having considerable difficulty getting the AVD to load correctly. I've done quite a bit of googling and research into the problem, both here on SO and Google.So far nothing has worked.

The emulator simply hangs on the android load-up screen ever time I try to run it. I've seen it advised to use Genymotion but I would first prefer to resolve the issue natively in Android Studio to feel confident going forward using the IDE for building projects.

Here's what I've tried:

  • Complete reinstall of Android, SDK and SDK Tools

  • Install and configure of Intel x86 accelerator

  • Lowered the RAM amount to 512 in AVD settings

  • Multiple attempts at deleting and recreating AVD's

  • Tried creating different AVD phone models(Nexus One,Nexus 5x etc.)

  • Resetting ADB in AVD Monitor Tool

  • Starting ADB server from terminal

  • Restarting Android Studio multiple times after changes

  • Running SDK/SDK Tools updates several times

  • Made sure the SDK path is correct

These are the majority of the "solutions" I found either on other similar SO questions or by googling none of which has resolved the problem.

When I run the emulator currently it displays the following in the run window:

/Users/<username>/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_API_23
Warning: requested ram_size 1024M too big, reduced to 512M
emulator: WARNING: Increasing RAM size to 1024MB
emulator: WARNING: VM heap size set below hardware specified minimum of 228MB
emulator: WARNING: Setting VM heap size to 256MB
Hax is enabled
Hax ram_size 0x20000000
HAX is working and emulator runs in fast virt mode.
console on port 5554, ADB on port 5555 

The emulator shows up fine in the Android AVD Monitor devices pane and even appears to go through the entire booting process on the emulator screen itself but never gets to the Android home screen. Also, Logcat seems to be looping continuously through dozens of errors and warnings, which don't offer any clear indication of what the issue might be or direction of how to resolve it.

I feel like I've exhausted every idea and not sure how to move forward.Just for the record, I am running El Capitan 10.9.2 with a 2.4gh Intel Core 2 Duo and 4gb ram.It's not the fastest machine for sure but should be capable of running Android Studio and the emulator.

Any help or guidance resolving this problem is gratefully appreciated!

question from:https://stackoverflow.com/questions/36753354/avd-emulator-stuck-on-loading-screen-in-android-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

For me this worked: in AVD(Tools->AVD) click on the small arrow for desired emulator then click on "Wipe data".

After that, it successfully started - passed the android logo screen - although a bit slowly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...