Is my PC fault, or android emulator is slow - android

I'm on the learning stage of android and I have to run/debug my application in emulator very often. The thing is that between I press the debug button and until the application gets started on the emulator I have to wait 1-2 minutes.
Is this normal? My PC is a i5 with 8GB RAM.

The emulator is certainly not fast, but one thing you should do is to make sure you don't close the emulator. Leave it running, and then most of the initial startup time will be taken care of. The emulator is a real emulator (unlike the iOS simulator). Think of the startup time of the emulator as booting up your phone. You're not going to turn off and turn on your phone every time you want to use an app, so similarly with the emulator, just leave it on.

It’s not normal, but it’s as expected. The Android emulator continues to be very slow and basically unusable for development. You’re better off developing on a real device. (Deployment to real device is much faster with Android IDE than it is on Xcode/iOS.)
Google has stated that it is a known issue, but it’s not known if/when it actually will get fixed.

I have experienced startup times of 5-10 minutes for the emulator to start up. The startup time to start debugging your application is going to depend on the size of your application. It has to tranfser the .apk over each time you want to debug. If your application is full of large files this can be a long time. One time I put a video in my res/raw folder and it brought my application to 25 mb. This ended up taking around 5 minutes to start debugging.

Related

Android Emulator becomes very slow all of a sudden

I am using the Android version 4.0.3 on a Windows system. My emulator was working pretty well, however all of sudden it became very slow.
It is taking too much time in launching so most of the time launch gets cancelled or I have to start the emulator ahead of time.
If you are having long times in emulator startup, you can configure AVD to save a snapshot of emulator. This significantly improves startup time, although the shutdown time will increase due to the saving of snapshot.
If you are having a slow emulator in general (booting and running programs), and, if you are using a Intel x86 processor you can install Intel Hardware Accelerated Execution Manager from android SDK. This will improve emulator speed by more then 10 times compared to the standard emulator. It even faster then a mid range real device.
good luck.
The emulators, all of them, on every platform, are infamous for slow startups. Typically you start the emulator, wait 'til it is all the way up, and then run your program. Debugging on a real device is infinitely preferable.
Leaving the emulator open between program runs is a necessity.
One of my professors gave up and spent several thousand dollars on a new computer with a huge solid-state drive because he could not get an emulator window up in less than five minutes, and it was impacting his ability to teach courses based on the platform. I went the cheaper route and dropped $200 on a tablet. Either way, hardware is the real answer here.

Android Emulator for Tablet

My PC is core i-5 with 4gb RAM.
whenever i try to run an AVD in eclipse it comes fast, if i want to run an AVD for TAB it take 5 to 10 minutes. Is there any way to make it fast? Also some time it comes with blackscreen says open gl es API problem type something
Also after fast run, i dont close it, i use it same AVD for all run. But it becames slower after every installation or run by my app. so i have to close and restart my AVD, is there any solution for it. Also some time DDMS cant find AVD, while it was running in font.
Anyone face these problem? any tricks?
one another thing, some time app dont run automatically after installation, i have to select app in AVD's APPS
The Android emulator does not make use of multiple cores. Whether you have 1 or 8 cores doesn't matter. However, the speed of a single core does affect the speed of the emulator.
Having a processor with TurboBoost helps considerably, in my experience. Additionally, it is well known that the 3.X and above emulators are extremely slow by nature.
You could also try allocating more RAM to the AVD in it's setup. Reducing the screen size and resolution also helps in speeding up the emulator.
You can refer to this Google Group thread for details on why the emulator is slow, and how to speed it up.

Speeding the Android edit-debug cycle

Developing applications for Android in Eclipse, press F11 to run the program in the emulator.
However, this means waiting for the emulator to bootup (and then unlocking the emulator's screen) each time you want to test changes to your program. Is there any way around this delay?
OJW
Are you closing the emulator after you test the app?
If you leave it running and then start your application from Eclipse again it will re-deploy and start (and avoid the overhead of starting the emulator).
You can also stop the application from the emulator perspective in eclipse before re-starting it.
-- Frank
If you have a physical device, you can use it instead of the emulator, it's much faster.

How long does the Android Emulator take to start? Do you need to close/start if every time you change Java code?

When developing for Android do you typically need to stop the emulator and restart it every time you make a change to your Java code or is there a faster way? The emulator takes about 1.5 minutes to start for me, is this normal?
Yes. Starting an emulator is slow, but you don't need to reboot it usually when you make changes. You can just target the already running emulator, at least in eclipse.
It is worthwhile to use the "Snapshot" functionality of the emulator. It can be enabled when you create (or you can edit) your AVD image.
This will take a "Snapshot" of the emulator image when you stop running. Then it restarts the emulator to that exact same place.
When using this feature, the emulator start-up time is sped up by a factor if 10+ (I see a 10 sec start-up compared to 90 sec to bring it up from scratch).
It is important to note, that this will maintain "state" of your emulator between runs. This can be useful if you are trying to test a particular scenario. It can be bad if you run your emulator out of memory, then "snapshot" that (at which point, you can always take a fresh snapshot, and start again).
The emulator take some time to start, depending on the running machine and the amount of programs you are running on the host.
If you installed the eclipse plugin, you don't need to restart the emulator each time: simply hit run in eclipse, and the plugin will take care of making the .apk package, put it in the device and start the activity (if any).
There is really no need to restart the emulator. You can keep it running all day (or longer). If you do not use eclipse: adb install -r will do the job (-r to replace the existing package) and restart your app.
Mine takes a minute + to start. I tried adding -no-boot-anim to speed it up, but the few tests I did it did not speed it up.
There is no need to close Android Emulator when you changes in code just simple do one thing
Leave AVD running and you will have to press F11 (or run your app), make sure you are at home screen of AVD.
To start the emulator in Eclipse, go to Window -> Android SDK and AVD Manager, then select the virtual device you want and hit start. This way it will stay on and not shutdown when your app terminates.
I have noticed that sometimes I have to shut down the emulator and restart it. It appears to hang at "waiting for home to launch". This only hangs the first time. Once it successfully launches I can reinstall repeatedly with no issues.
Yes, as everyone said you don't have to restart the emulator. I'm not sure if it's my computer (obviously to some degree it would be) but even when I simply make a one line change and relaunch, eclipse/AVD take roughly 2-3 minutes to fully load my new package to the emulator. Sucks having to wait this long between changes, but it also makes you want to write better code the first time rather than being sloppy and just test the results.

Is there any way to reduce the boot up time of Android Emulator provided with android SDK

On my system, i am using eclipse ganymede version along the Android SDK and ADT plugin installed. I have created an android AVD (target android 1.5) with 512MB of memory. Its quite frustrating to see the slow boot up of it. It takes around 4-5 mins to complete its boot-up. Is there any way or tweak to speed up this boot up process.
PC config:
P4 2.4 Ghz with 1 GB ram.
You can use the -no-boot-anim command line option which speeds up the boot process by not showing the boot animation while the emulator starts up. It makes an noticeable difference on my system reducing start up time from around 55 seconds to nearer 45 seconds. (In case you're interested this is on a laptop with a Mobile Core 2 Duo L9400 and 3GB of RAM.)
Use a command line like this to start the emulator:
emulator -no-boot-anim #YourAvdName
where YourAvdName is the name of the Android Virtual Device (AVD) image that you want to start.
There is now way of to speed up the boot process. This is the downside of having a real emulator not just a simulator like the Iphone kit offers.
You don't have to quit the emulator after a test run. Just start the emulator at the beginning of your work and close it after you are finished. If you want to test something very quick I often find it easier to just connect my actual device and run my app on the real device, without waiting for the emulator to start up.
There's no real way to cut the time down significantly, and it performs so poorly as a tablet device, it's barely usable. Bottom line, you need a real device to produce production apps. It's good for learning though.
The "emulator" is widely known for being a simulator. It does not:
come with device roms or known emulation for real world devices
off phone or SMS support
have the ability to open listening sockets for incoming requests
etc etc. It is not an emulator like mame. It's a simulator like the iPhone/iPad simulator.
i started off with the default settings on the AVD manager to create a new AVD and it started up kind of ok, about 1-2 mins. later i deleted that and created a new AVD with 8GB internal memory (like the real device i'm using) and startup didn't! i waited 30 mins but still nothing
so i reverted to the default memory (512MB) and it seems to start ok
but i also noticed, its a bad idea to unclick the hardware buttons options, that causes it to load slow too
install virtualbox and use androVM
much better than the emulator
The option that I select so far is to buy a cheap mobile from Kogan.com and use this is your app tester.
Otherwise you can also go and install Genymotion, which is definitely a ++ tool over AVD through Android Studio.
It is fast as well. However, keep in mind that there are many features that will be missing such as google play services. Thus, it is advisable that you buy a device. With Android supported mobile, you could basically do everything and simulate every events such as swipe shake etc...

Categories

Resources