I try to run the hello android example on my notebook Dell Latitude D531 which has following specification:
http://img573.imageshack.us/img573/9990/ntbspecification.png
I set the virtual device as following:
http://img823.imageshack.us/img823/4070/myavd.png
(Sorry for links instead of images, but I don't have enough reputation points yet)
When I created this AVD and started it, it took like two hours to start, after that, the device was unusably slow. I read the other topics here, where people wrote about their experience with starting of the emulator, that it took long ... like 15 minutes when they started it for the first time. But in my case it takes not minutes but hours, and when start is completed, it isn't usable at all.
What are your suggestions for improvement of speed or performance in this case?
What do I do wrong? - is my notebook too slow, is the configuration bad, whatever you think could help me ...
With regards,
Tom
You have three problems:
Your notebook CPU is a bit weak
The 3.0 emulator is unusable, IMHO, unless you increase the "Device ram size" to 1024 in the AVD configuration (your 2nd screenshot), which may be more than your PC can afford to give the emulator, particularly if you are also running Eclipse, since you only have 3GB of RAM
The 3.0 emulator is slow in general, even on faster hardware
Right now, I recommend that you use an earlier API level (e.g., API Level 8) for your emulator, if possible.
I've found that using the snapshot feature helps, sometimes. The emulator is pretty unreliable. If you're doing any amount of dev I would get a real device. Even an outdated "cheap & cheerful" one from ebay would give you a big productivity boost.
Related
I'm on Windows 7 with i7 processor and I'm trying to use Android SDK Emulator. However, when I set pixel density to 320 and turn GPU emulation on it starts to lag and freeze and its browser is almost not usable (it's like 1 frame or less per second).
So far with the below settings it's much, much better and I would qualify it as 5 to 10FPS which is usable but it's not 30FPS (smooth usage).
Abstracted LCD Density - 120
GPU Emulation - NO
Keyboard Support - YES
Can anything else be done to make it work smooth except moving to Linux? I noticed that GPU emulation impacted the performance the most.
The most important setting is your architecture, make sure you are using an Intel emulator. The speedup is tremendous!
A how-to is posted here: https://stackoverflow.com/a/10772162/1741111
If you are trying to achieve that 30FPS mark, forget Android emulator and switch to Genymotion.
I was working on Android emulators for 6 or more months before i discovered Genymotion emulator and what difference that has made to the speed of development.
If you are still developing on Android emulator - go and give Genymotion a try. You will thank me for that. Its a huge difference.
There is a free version for individual developers.
Even though this is an old post. I think this needs a mention here.
You don't need to buy a phone. The emulator is a great tool, however very slow. You can enable hardware acceleration to make it run smoothly. Follow the steps on the developers page and you'll notice a remarkable difference in the speed. AFAIK the settings you mentioned do no have that great influence on the speed.
I have wrote a short blog post on speeding up the emulator and adding Google map support:
the first part will be relevant to you. try the Hardware acceleration and tell us what you think:
here is the post:
Speeding Up the Emulator
The best emulator is to buy a simple Android Smartphone and debug/run your apps on this device. I'm doing this and it works wonderfully with no laggs
So far I have been developing directly on my galaxy nexus and nexus 7 using the amazing AID app.
However, as the N7 can't provide logs due to it being jelly bean, i feel the need to get a mini notebook in order to utilise adb logcat.
My main worry is that something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU won't be powerful enough.
I can possibly get around certain worries by not using emulators and testing directly on my two devices, so that will save me a great deal. Also I am tempted to just use vim and command line tools instead of eclipse which again might save me from a slow PC.
What do you guys think? Is the notebook way under powered? What if i just use vim and no emulators?
Side note, does anyone actually code in vim/command line?
something with only 1gb (2gb if i upgrade, which i will) and a 1.5-1.83GHz atom CPU
will work just fine, as long as you're not planning to run a tablet emulator. I sometimes have to work at my Asus EEEPC with the same exact CPU and I've got no problems so far
It is doable with 1gb RAM and using vim/commandline tools. However, eclipse provides a project wide perspective which is hard to duplicate in vim (vim power users may be as productive, if not more though). So in terms of memory 1, 2gb RAM will be fine. Testing on devices is always better than emulators.
One thing else though, a commandline build with multiple module dependency is non-trivial to setup and maintain. This is because Google has historically been modifying the build.xml file, breaking existing build scripts fairly regularly. So if you are well versed with build script internals and prepared to work on them you should be ok.
Debugging Android apps without Eclipse based breakpoint debugging support may be a significant issue too. Some bugs are caught in a lot lesser time with this. So plan accordingly if you don't want to use Eclipse.
Eclipse also provides very good JUnit/Robotium support for writing test cases, You won't get this with vim.
As I wrote down these points I think running Eclipse in 2gb notebook should be possible (just don't run other apps with doing development) and thus is recommended.
I have extensively used vim just not for Android development. You can also install vim plugin for eclipse if you prefer that.
Modern notebook hardware certainly is capable for software development; in fact, many (hobbyists as well as professionals) use a notebook as their main development platform.
However, with a mini / ultra-small form factor, you'll pay more for a less capable machine. Unless you need extreme mobility, I would suggest a standard notebook, with a little extra money spent on RAM (8+ GB) and an SSD. (Then, neither big IDEs nor emulation is out of scope.) If money is an issue, you can still get clunky-looking, but fairly powerful 15" or 17" laptops.
i think you Configuration is good enought to run Eclipse , Myself i had to Remove some Composant on my PC beacause we have 1 PC for Work/Internet/Eclipse and 1 PC for Gaming Etc ... , iam using Galaxy S2 and dont use Emulator many times , Yes i have some Slow Down some Time , but try Eclipse with the Minimal Configuration and No Emulators but Upgrade to 2 GB i have myself 2 GB Here and DUal Core E5200
Yeah that's under powered. For a windows PC I'd want 4gb of ram, not sure about Linux but atoms are dog slow either way.
I'm sure it'll work but it won't be fun, I'd be most worried about disk speed as that's what drives me nuts most.
I'd also take advantage of the ide and all its nice features too
I'm developing an android application, since there are many assets, the generated apk is near 10M. Now deploying it to a simulator is very slow, often takes me 3 or 4 minutes, which is unacceptable.
I've used Robolectric to test most of the logic, which is very fast. But sometimes I still need to use emulator(e.g. adjust the UI), which waste me a lot of time.
Is there any way to make it fast?
This is my experience, too. Debugging with the software emulator is very slow.
It is much faster to use a real device in debug mode. However, you may run in other limitations
Well since somebody suggested Android x86 as an alterante testing Emulator, I'll also present my favorite. This might not be an alternative for everyone but for me it's perfect! Use the Bluestacks Player. It runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running
adb connect 127.0.0.1
After compiling it installs instantly. Very impressive, considering I have a rather average computer hardware(dual core with 4 GB of RAM)
I've found android-x86 image on VirtualBox many times faster for deployment than an emulator running on same machine, sometimes even faster than a USB device.
EDIT
Please use the android image provided by vmlite, not the one provided by android-x86, and refer to this important question: How to change the screen size of vmlite android?
Actually, I absolutly never use the Emulator, which is way too slow in every situations.
I test and debug my apps directly on real devices (and use the ADB screenshot features when I have to pixel-check some screens..)
Hope this helps...
I am almost done with my app..when i run it on the emulator ,at certain points,
it is very slow and what i see is undesirable..when I run the same on my phone (xperia X8)
it works fine.
I really tried understanding why this is happening but of no avail!
What should I do now? run some more tests and try optimizing or just
release it in the market?
Is what I am seeing expected? Any info will be appreciated
You really should buy as many Android phones as you can. You definitely should have one with a physical keyboard, one slate phone, and one for the lowest API you are supporting. Personally, I have G1, Droid, and Nexus S that I test my apps on. Its so much faster than the emulator and easier to use. Its also a better metric of how your app works due to it being on actual hardware.
The emulator will always be slower than a real device (most likely, slower than any real device), so don't worry too much about it.
However, due to it's slowness, it can highlight areas where you may want to spend some time optimising your code that you may not necessarily find on your hardware. This is especially true on portable devices with limited CPU power, resources, and electrical power available.
It may be worth trying to find out what is causing the slowdowns in the emulator - if it's regular enough and accompanied by (for example) high CPU usage, then while a physical device may handle it better, you may find that you are unnecessarily consuming battery power and your users may not thank you for that.
The emulator is generally much slower than a physical device, so it's not a problem with your application. As long as it runs well on your phone it should be fine.
I agree with everything dbaugh said. At least at the time of this writing, the emulator is of limited use. Google has acknowledged the limitations of the current emulator and indicated they are working to revamp it. But until that happens. Stick to hardware testing.
Is there any way to get the emulator work normally ?
Its still very slow and useless, I tried adjusting the cache size and Ram.
My system configuration is quite good, are there any tips and hints to speed up the avd ?
Not much you can do, but Al Sutton lays out some things that can help a bit.
http://blog.alsutton.com/2011/01/27/the-android-honeycomb-preview-emulator/
For serious development, you'll need a Honeycomb tablet.
You may have heard the many complaints about how slow the Honeycomb emulator is. And indeed, the Android emulators have long been slow. Certainly slower than most phones. But Honeycomb is slower, so much so, that even Google engineers have admitted it makes more sense to develop testing on a real tablet.
Now my experience has been a little surprising: on my 1.6(?)GHz Pentium with 4G of memory running Win7, I have been surprised at how fast it runs. That is, I was prepared for the worse, yet found the response time to taps surprisingly reasonable.
That said, it is still noticeably slower than the 2.2 emulator. But not as slow as the real hardware we had to suffer with in the 80s;)
Finally, not only the emulator, but the whole SDK (including that memory hog Eclipse) become a LOT more usable when you have at least 3.5G of memory available. This means a 4G stick. When I was trying to run the 1.6 SDK under Linux with only 2G, it was frustrating how often Eclipse locked up. But with 4G, it is fine. So upgrade your memory to at least 4G before you worry about other measures, such as faster CPU.