I am following this tutorial first time ever working with android:
https://developer.android.com/training/basics/firstapp/creating-project.html
I created a new project, made no changes except to drop a webView in the middle of the main view.
Then I clicked run app and selected the default profile, which was a nexus 5.
The console showed that the app built in 2 seconds.
Then... nothing, no app, no emulator popped up,
The two tabs, "app" and "nexus" show:
app:
Waiting for device.
~\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_21 -netspeed full -netdelay none
nexus:
emulator: device fd:772
HAX is working and emulator runs in fast virt mode
There is nothing on the UI that indicates that anything is happening at all.
In windows task manager, it shows emulator.exe with 0% cpu and 2gb memory.
I have checked other posts, and I definitely do have the Intel HAXM installed
Where can I even begin troubleshooting what went wrong?
The default emulator is very slow, and it may start for a long time. Many developers are using alternative emulators. The best one, is Genymotion. It's free, and really fast. If you want know more, read about it here, and how to install it here.
Here's a video instruction, how to install it.
Try reducing memory size and try other system images
most of the time intel x86 atom system image works perfectly
Make sure your HAXM driver is the latest.
Check to see if there are any updates in the SDK Manager.
The emulator can't load HAX
I recomend you to use GenyMotion emulator.
It's simple to install and use.
Intel Haxm have many problems . You should try to use https://www.genymotion.com/#!/
Its a free, limitated and fast emulator, work with Haxm, and have plugin for Android Studio, and many predefined devices for working with that.
Related
My sincere thanks for your reading this.
I have just installed Android Studio and am attempting to run the default Hello World! script that is present when you create a new project.
Every time I try to run the the program in an Android Emulator my Emulator crashes and I get the error "Android Emulator Closed Unexpectedly" Every. Single. Time.
I have the Intel x86 Emulator Accelerator (HAXM installer) installed as suggested:
I try to run a Nexus 4 emulator with 512 mb of Ram and it never works:
When I run this I get:
During this, my system physical memory peaks at 80% but never goes to 100 (which I would expect if it were crashing).
I have searched similar questions including
Android emulator crashing on Windows 7 64 Bit Android 4.0 emulator always has a crashing Launcher? Android studio emulator fails to start with memory limit related error message and they say to lower the memory size (which is what I am trying to do). Unfortunately this isn't working
Any idea how I can solve this issue?
My computer specs are as follows:
64 Bit Windows
6gb Ram
Intel Core i3
I downloaded and installed all correct versions as instructed here: https://developer.android.com/studio/install.html
In my case, this issue took the whole weekend to solve.
All options I tried, until:
Android Development Studio prompted me to update the Android Emulator Version to 25.3.1 (no idea what it was on before as I didn't check this before). This was a download of ~170mb.
Once I downloaded and installed the update, the emulator now seems to run OK on low memory settings - settings in keeping with the answer to this question here: Android emulator generates a very annoying error
I am now running with settings:
RAM memory to 5012
Virtual heap 32
Internal storage 200 mb
External storage 64 mb
So basically, it was a complete fluke that this worked.
To anyone that gets this error after rooting the android image, (if using snapshots). You need to start the virtual device with the -writable-system parameter like when you rooted the device, excerpt from docs.
Snapshots
...Starting a virtual device by loading a snapshot is much like waking a physical from a sleep state, as opposed to booting it from a powered-off state.
I was also having the same problem, Every time I was starting Emulator, it was closing unexpectedly. then I tried to change the Emulator Performance in settings of AVD Managers; In Software it's not working but in Hardware it was showing blank black screen.
Then I realized, there might be some issue with Graphics Card(mine NVIDIA GeForce 940MX), It was showing this error
After Updating/Restarting the problem was not resolving, then I Disabled then Enabled the Graphics Card Driver in the Device Manager and It worked!!😊
LONG STORY SHORT: Check, the problem might be due to your Graphics Card!😐
in my case, i attempted using gennymotion [ you may install it asking google genymotion . com] this could serve as alternative.
if gennymotion after installation returns this error message "the version of openGl supported by your graphics card is too old:Genymotion requires at least openGl 2.0 support. "
then know our challenge is arising from not having required graphics driver
either you checkout this link [https://buffered.com/support/solve-opengl-error/] on how to resolve it in steps.
or you download the graphics drivers using the links below
Here are the links to the 4 most prominent graphics card manufacturers in the world:
Intel: http://www.intel.com/content/www/us/en/support/detect.html
restart your systems after installation of the appropriate graphics driver and continue your project .
I am using Android Studio with Intel HAXM. The problem is that the Android emulator takes too long to load and once it is loaded it is slow despite the Intel HAXM installation.
I just referred this question and below were my results
Android Studio startup is taking long
Result: The emulator is still slow even after loading it for a couple of times.
Intel HAXM configuration
Memory allocated: 1.9 GB(this is the max size as specified during the installation)
Status: Intel HAXM is working.
Android Studio
AVD Details
API Level:19
Android Version: 4.4.2
Please see the screenshot
System Configuration
Core i3 2nd gen
4 GB RAM
Please let me know if further details are needed.
I had the similar problem to you in the past, but its just down to your processor (i3) as it cant handle the emulator that well, you can debug/run your app on to an android phone or tablet. If you have either of these to hand you need to go to RUN ---> EDIT CONFIGURATIONS and change the target devices to 'USB device'. On the phone/ tablet you need to go in to developer options and turn on USB debugging, if this doesn't work check to see if you have the phones/tablets drivers installed. There are plenty of tutorials on youtube. Good Luck! :)
I just installed Intel HAXM and updated my Android SDK Tools to revision 24.1.2 successfully. Then I restarted my PC, and ran the emulator. Unfortunately, I my emulator won't starting up, always stuck. Waiting for ~1 hour, the emulator still getting stuck. Sometimes the screen was black, didn't show anything even the ANDROID logo while emulator was booting (full of black color). My screenshot:
The second problem is, as you can see in the figure, this is an abnormal behavior. There's no title bar, because it hides on the top of my desktop. So I can't move the emulator window to the center of my desktop.
From the Console, it seems that Android Studio is waiting for the emulator to finish its start up:
What have I tried:
Restarted my PC.
Followed this answer.
Check and uncheck Use host GPU option in AVD.
Re-build my emulator in AVD.
Closed the emulator and ran it again.
Changed CPU/ABI to ARM and Intel Atom x86 in AVD.
Can you help me to solve these problems?
Have you tried with a different\more recent Android version?
I suggest you to switch to Genymotion.
It's free for personal use and it very better than AVD: it's faster, you can drag and drop files and much more.
I asked my mom to pray for me to solve these problems, and I found the solution then, hehe :P
So these problems happened because of the skin of emulator I selected in AVD was WQVGA432. Then I changed (edited) the emulator's skin in AVD to WQVGA400 and WQVGA800 to test the result, and it really works for both of them. I think, the only skin which has broken is WQVGA432. If you also had these problems, I suggest you to never select WQVGA432 skin or try another skins.
Now, I can move the emulator window normally and debug my app.
Try updating Android Studio and re-download the image file from SDK
Because the emulator was really slow I installed the intel x86 emulator. I changed the settings in my emulator (ARM to intel atom). Now when I run a project it takes me to the emulator selection screen and when I select it, the project starts running, but the emulator doesn't pop up.
I tried switching the cpu back to ARM, but it still doesn't work.
When I close Android studio it asks me if I want to disconnect from the project so I'm sure it is running.
I came across a few posts that said to give the device 768 ram, but that didn't work.
Anyone knows a solution?
I was facing the exact same issue, but for me reducing the device RAM to 768 did fix it. Therefore I'd suggest continuing to decrease the RAM values and trying to launch it.
How about to use Rock speed Emulator - Genymotion?
I know it sometimes take time to launch emulator and launch app in emulator too. But it depends on your configuration of your PC and settings you have done in Eclipse or Android Studio.
For example: You may have kept "Build Automatically" ON and it sometimes slow down running time.
My current rep is not high enough yet to comment on another answer, so I am adding a new "answer" to +1 Paresh Mayani's answer to use Genymotion. I only recently discovered it and found it to be much much faster than the emulator. Instead of emulation it runs an Android rom in a VM using VirtualBox. I've found that it runs full speed on my machine and is just as fast in debug mode as normal mode, which is impressive since even my Nexus 5 struggles when connected to a debugger.
In my case also x86 was creating problem, I installed Android 5.0.1 armeabi-v7a and have set 768MB as RAM size and it worked.
Try to check and run the emulator ie. store a snapshot for faster startup...
I have tried that by checking the button and works fine.
If you're using an AMD machine try using the "ARM EABI v7 system image". For an intel chip use the "APIs Intelx86 Atom system image". Also, try a different tablet from the Android Studio settings e.g(Nexus 6), as the API level might not be supported from in the Nexus5 VM. You will also have a little wait time for the android emulator, mine takes about 7mins
I know that the topic was discussed here last year, but I am hoping that someone has since found a fix. The emulator is simply not working for me anymore. It took 15 minutes or so to load hello world a few days ago, and now I can't get it to load a simple MapsDemo from the api samples no matter how long I wait.
I'm using eclipse with the android plugin (sdk and avd manager). My pc is 2.31 GHz quadcore with 8GB ram and windows 7 x64. Nothing is being logged in LogCat apparently.
Are there any alternatives or certain fixes I can try before buying a phone? I'd just upgrade my phone to an HTC Incredible and debug from the phone, but Verizon won't have any for at least a month and I'd really like to have my app out by then.
The best advice I've received is to use to target an older platform and a lower resolution. The emulator for Android 1.5 at HVGA is significantly faster to load than 3.1 at tablet resolution.
If you are running an emulator for a newer Android version, and want to see what it is doing while loading, you can watch on 'adb logcat'. It at least gives some better feedback than the word "Android" with a light shining across it!
Delete all your AVDs & re-install the SDK in a new directory. This should clear out any lurking config settings or AVD based issues which could be causing the slowdown.
Also try shutting down any virus/spyware scanner you may have running because you can then see if your AV app is trying to scan the AVD and or SD card images which could slow things down.
(btw, I'm running the emulator on a Quad Core Q6600 with 4gb RAM & Win 7 x64 and it starts in less than 1 min, so I doubt it's a compatibility issue).
I usually start it then after I see the "ANDROID" screen close it and restart it and it works and starts up a lot faster the second time.
I have started using ubuntu v11 (with dual boot) ,emulator is now starting within 40sec and working without any errors ,which i have encountered in windows 7 and performance is also good.
I just had the very same problem today, after I received the advise, to create a 400MiB SD Card on my AVD. I did so, but nothing worked anymore. I waited half an hour for my App to compile, but nothing happened even though the LogCat was still runníng ... So I came in here to find a solution and I did!
Here`s what speeded the whole thing up again:
I went to the AVD Manager (Window > AVD Manager in Eclipse)
Above the AVDs you can see the path where everything is stored that is created by the machine
So I went to that folder of the path and it was filled with previously compiled stuff
So I deleted it and voila, my App is run within a minute again!
P.S. It might be the case, that you won`t find the last folders described in the path, because they are hidden. Just type in that path, and they will be there: The hidden folders looked like this: .android\avd
Just type it in manually and erase all that stuff in there.
Using SDK Manager download and Install Intel x86 Emulator Accelerator(After downloading this SDK Package can find executable file at path "SDK_LOCATION"\extras\intel\Hardware_Accelerated_Execution_Manager Install it) and also Intel x86 Atom System Image packages.
Then create a new AVD with CPU/ABI as Intel Atom(x86), and Check Use GPU Host. Done!