views:

3730

answers:

8

I'm new to Android, but have published iphone and bberry apps. I see that I have to create an emulator using the SDK, before I can write and test an app. Why are there no default emulators? Why not at least a Nexus one, or HTC hero emulator shipped with the product?

Sure its supposed to be flexible, but why not make it easy to create hello world and play around with a virtual Android phone? Both blackberry and iphone come with default simulators when you download the sdk.

Thanks, Gerry

+9  A: 

Since you can create an emulator configuration - or Android Virtual Device (AVD) - with three mouse clicks and typing a name I don't see too much wrong with the Android Emulator that ships with the SDK.

The reason that there's no Nexus One or HTC Hero emulator is that these ship with proprietary code which can't be given away free with the emulator.

The Sense UI that comes with the Hero is written by HTC only for their handsets and some of the Google Apps, such as Google Maps, GMail and YouTube are owned by Google and are not part of the Android Open Source Project. I believe Google charge handset makers for these apps and if they included them in the SDK then anyone could have them for free.

Dave Webb
You could even argue that having no preconfigured device emulator is a good thing, because it makes it clear that you're developing for the Android platform, not just for one particular device.
Mirko Nasato
Thanks, one problem I'm having is that the standard command line to create an emulator is not working for me.android create avd --target 2 --name my_avd (fails)When I type "android list targets" it returns nothing. Do you know what I am missing from the install?
Gerry
If you enter `android` with no arguments you'll get a GUI for managing your AVDs. Does that work?
Dave Webb
+1  A: 

I'm confused by your question. The SDK ships with an emulator. You just have to create and configure an instance of it first through the SDK and AVD manager.

Yuliy
+1  A: 

It used to be this way, but was changed to make developers think about what platform version / configuration they are developing against (and to allow multiple platform AVDs to be created).

Here is a quick way to launch an emulator running cupcake:

$ android create avd -n android1.5 -t

$ emulator -avd android1.5

Karl R
A: 

Thank you for asking, I am new to this and wondered how to create an instance that matches, say, Nexus. Gave me some food for thought anyway.

Matt
+4  A: 

The SDK includes emulators for all currently released devices, you just have to create and name them.

To create a "Nexus One" emulator, you would create an AVD that is using the 2.1 SDK, and has a screen size of WVGA800. It's as simple as that.

Austyn Mahoney
A: 

You can create appropriate avd using android (android.bat) in folder /tools of sdk. Also you can choose resolution, sd card, API level. It's really easy:) If you want to write for Nexus - why not? Choose appropriate sdk level and enjoy.

chiterka
+1  A: 

What about other features.... i would love to make my app work on all android devices but, i dont own all of them, just 1. So i have to create an avd for each possible hardware configuration(phone). meaning i have to track down the exact specs for say 5-10 phones? resultion, density, aspect ratio, input types, multi touch? proccessor FPU? some do some dont. etc etc. something needs done.

nathan
A: 

When creating an AVD, there are two choices, for example: Google-API Level 7, and then there is Android 2.0.1

Whats the difference? If I don't select Google-API, it doesn't show up in Eclipse-Debug-configuration, so I never get to try that one...

jim