It has been about a year since I’ve done consulting work for an Android app. A new project has me designing UA for that platform again. As with all the mobile projects I’ve worked on, I like to get the developer tools installed so I can experiment with prototype applications. With my Android tools at least a year out-of-date, I knew it would take some work to get going again.
My earlier experience setting up Android is chronicled in my book Developing User Assistance for Mobile Apps. There was nothing straightforward or easy about it – at least from my perspective as a designer and writer. Installing the various components required a lot of research. I even had to hire an Android programmer to set spend three hours with me so I could get everything working.
I was hoping this would no longer be the case, but I wasn’t very optimistic. Apple and Microsoft make money off of their mobile platforms and put out tools that are very straightforward to install and use. Google gives its OS away for free and so you get what you pay for in terms of tools.
Fortunately, the Seattle Google Developer’s Group recently sponsored a Dev Fest. For just 20 bucks, I had the opportunity to get help from some expert developers. Overall, I found that the latest installation process was easier than my previous experience. But I still saved a bunch of time and headaches through the mentoring at Dev Fest.
Skim through this article and you will think I’m just screwing with you. The number of steps seems absurd. I agree. Compared to IOS and Windows Phone it is. However, 90% of what you see here is a one-time deal. Make it through to the other side and after than it is just repeating Save/Run as you test your designs.
There are several major areas to the setup
- Installing the Android SDK
- Installing Eclipse (or other IDE)
- Installing the ADT Plug-in
- Creating a Virtual Device
This article will cover those areas as well as a couple of enhancements. The information here is a relatively short diary of my installation experience and just reflects my own interests. There is a load of detailed documentation on the Google developer site regarding this subject.
Installing the Android SDK
The first step is to download the Android SDK – in my case, the version for Windows. The link provided as a starting point in my book is still active. However, there is some useful information at a higher place in the link hierarchy so I would recommend this page to start:
The SDK install file is about 70MB. Launch that and the Android SDK Tools Setup Wizard appears.
The latest version of the SDK setup integrates some components that I had to find separately before. The first thing the Setup does is check to see if the Java Development Kit (JDK) is installed and to install it if it isn’t. I was installing on a new computer so there was no decision about updating existing files – I just did a fresh install of everything.
The next step asks where you want to install the Android SDK. The default location it picked for me was a deep folder in the Users section of Windows. I personally don’t like to put my tools there so I created a folder under Program Files. That turned out to be a mistake as I later found out it created some conflicts with my Windows admin setting. The location I now have it in is its own top-level folder off the root of my C volume. That seems to work fine.
Once the Android SDK is installed, the SDK Manager appears in a new window. Make sure you are connected to the Internet for this step. The SDK Manager checks online for the latest tools, API updates, and other components. The Android SDK install is just one layer of the software that is actually required. This part of the install is another area of improvement from the past. Previously, it was more difficult to find out what you needed and where to get it. The download suggestions appear automatically in the SDK Manager box.
- Intel x86 Emulator Accelerator (HAXM): The accelerator speeds up the loading of the emulator significantly on a 32-bit Windows machine.
- Android SDK Platform-tools: I’m not sure why I needed this one but the person who was helping me told me I did.
Click Install x Packages. On the subsequent nag screen, click Accept All and Install.
Now you’re rolling again. This download stage will take some time depending on your network speed. The overall size of the downloads is considerable. However, the SDK Manager takes care of it and will sequentially download and install everything that was selected.
The SKD Manager leaves you hanging when it is done. There are no additional wizard instructions. Close the window and refer back to the Android master instructions for the next step.
Before you can start doing anything useful with the SDK, you need to set up your development environment (IDE). The open-source Eclipse editor is a popular choice and I will cover it here. However, other tools can be used if you have another preference for an IDE.
You can find the Eclipse downloads here:
Select the latest version of Eclipse Classic as that is recommended by Google. This download is in the 180-200 MB range. The version I used at the time of this writing was the Juno package, v. 4.2. The Elcipse updates follow an alphabetical, mythology naming pattern.
Eclipse downloads as a zip of ready-to-run project files. There is no install process. Unzip the package and the files will be in an “eclipse” folder. You can move this folder to any location on your system. I put mine in the Program Files folder in Windows. This software does not have the issue I mentioned earlier related to where I placed the SDK.
Click eclipse.exe to launch it. I added it to my desktop as an icon. The first time you launch, Eclipse asks where you want to save your working files. This can be any data location you choose.
Finally, Eclipse appears with a page of links to helpful “getting started” information.
Installing the ADT Plug-in
So far, so good. But you’re not done yet. Eclipse needs to be linked to the Android-specific software. This is done with the Android Development Tools Plugin. Follow the instructions here to Download and Configure the ADT Plugin:
Creating a Virtual Device
Still not done. In order for your project to display in the emulator, you need to create an Android Virtual Device (AVD). Android can be configured in many ways for countless devices. You need to define the device you want to represent.
From the Window menu, select AVD Manager.
From the AVD Manager box, click New. Type a name for your device. It can be anything you want. Let’s say “NexusPhone”.
There are a number of items you need to select. But only two of them are really relevant for experimenting. One is the Target List. This other is the Built-in.
From the CPU/ABI list box, select Intel Atom (x86). This is the fast emulation I mentioned earlier in the ADK Manager section.
For SD Card, select 256 MB. You won’t be working with this attribute, so it doesn’t really matter what size you add here.
For Built-in, select Default (WVGA800). This list box has a bunch of “skins” that represent popular generic device sizes. The default selection is for the popular Wide VGA display phone with a 480×800 pixel screen.
The TestPhone label should appear in the AVD Manager box.
Run a Sample Project
Now you have your development environment set up. If you want to play around, there are sample apps available. A good one to start with is Notepad. You can find it in your Android SDK folder under “samples”.
From the File menu, select New/Project.
From the New Project box, select Android/Android Sample Project, then Next.
On the Select Build Target box, Android 4.1 should already be selected. Click Next. The installed projects appear.
Select a sample project – like NotePad – then Finished.
From the Run menu, click Run Configuration.
In the Run Configurations box, click the Target tab.
In the list, you should see your TestPhone AVD. Select it. Click Apply, then Run.
If any one of a dozen things didn’t go wrong up until now, the emulator will appear. Even with the speedier Intel emulation, it might take a minute or so for Android to populate the emulator. In the end. If everything worked, you should see the Jelly Bean logon screen.
A future article will cover working with your prototypes, adding ADVs and using the screen capture utility.