Kotan Code 枯淡コード

In search of simple, elegant code

Menu Close

Hello Android – Worst First Impression Ever

This evening I thought I would try and install the Android SDK, Eclipse, and the Android Developer Tools (ADT) Plugin for Eclipse. I was feeling adventurous and thought I might see what the other mobile developers do, given that I have written both applications and books for iOS and Windows Phone 7.

First, I installed the SDK which was a fairly painless process. Then I installed Eclipse (Juno), another fairly painless process since installing Eclipse consists entirely of copying the eclipse folder to some location on your hard drive and double-clicking the eclipse.exe file.

Next came the ADT Plugin install, which is the first place where the “first timer” experience started to suck, and it sucked big time. I got the following error message:

Cannot complete the install because one or more required items could not be found.

It showed me that one package was missing, so I de-selected it. I did this until I had no more items left to install. That couldn’t possibly be right, so I had to google to find out that I needed to add the “Juno” release repository to the list of available software update sites before installing the ADT Plugin.

I was really quite upset that the ADT Plugin, as described by the installation instructions on Google’s own web site, doesn’t install as they say it should. I consider that a first impression fail.

Finally the ADT Plugin installed. Now it was time (I had already blown 30 minutes at this point) to create a hello world application.

Step 1 of the New Android Application wizard:

Hello Android - Step 1

Hello Android – Step 1

Next the wizard asked me to supply some basic stuff like the application name and the project name and the package name. Being familiar with Java, I recognized what I should put in the package name but, what’s the difference between project and application name? Is it like a Visual Studio Solution vs. Project? I had no idea.

Hello Android - Step 2

Hello Android – Step 2

It also asked me to choose a Build SDK and a minimum SDK required. This sort of made sense, but only because I had seen similar settings in Xcode in choosing the build SDK versus the minimum required SDK version. There is some context sensitive help here and there are little “info” buttons you can click to get some more help. It feels a bit “closer to the metal” than the iOS new app wizard and waaay lower level than the Windows Phone 7 new app wizard.

Hello Android - Step 3

Hello Android – Step 3

I got a few prompts related to icons, color, foreground and background color, scaling, and a bunch of other stuff where I had no idea what the final impact would be on the end application. This was also fine – I expect to see unfamiliar things in unfamiliar territory. My usual learning process is I’ll get in there, create a hello world app, confuse myself, then work backwards until I’ve figured out what’s really going on under the covers.

Hello Android - Step 4

Hello Android – Step 4

The next step in the wizard asks me about activity name, layout name, navigation type, a hierarchical parent (would it have been so hard to use the word inheritance here??) and the title of the activity. This was also pretty straightforward.

Hello Android - Step 5

Hello Android – Step 5

Next we get to the fun part. The wizard is telling me that I am missing dependencies!!! I hold my back urge to smash a fist into the keyboard and launch into a diatribe on Twitter and/or Facebook about how pissed off I am and try and install the dependencies. After five attempts, I still get messages like the one below, indicating it can’t find the dependency file:

Hello Android - Step 6

Hello Android – Step 6

I again have to resort to internet searches (out of spite, I used Bing this time instead of Google) to figure out what the heck was going on. I had to exit Eclipse, then go and launch the Android SDK Manager in Administrator mode, and then download the missing dependencies. This finally worked and the next time I started Eclipse I was able to re-do all of my prior steps and get to the point where it created a new project for me.

By now, my patience is pretty limited so I want instant gratification. I hit the play button up top and start answering questions and then the Android tools bitch that I haven’t created an Android Virtual Device (AVD) yet. I swore a blue streak, the puppy nearby tilting its head and wondering why I was barking so much.

I created an AVD with utterly random values as it asked me for information I certainly did not feel as though I was qualified to give. The AVD failed to start. I created a different one, and this one failed to allocate memory (error code 8 if that means anything to anyone). I then created yet another AVD and it started, but the application wouldn’t launch because … drumroll … it couldn’t allocate enough memory.

After another shut down of the device emulator and a fresh creation of another AVD and a fresh hit of the play button, the application launched (after a nearly four minute wait while the emulator started up and the app installed!!).

Because I’ve been around the block I know that there is more to it than this and I know it gets better from here. However, if I was a newbie to the platform and hadn’t been around as many blocks as I have, I could very easily have been turned off by this first-timer experience and said, “Screw this, I’m gonna go use the iOS SDK.”

Shame on Google for not giving a crap about first impressions. Everyone should.