Android app development 101: Preparing environment part 2
This is the second part of 2 posts. During these posts you will learn how to set up your windows environment for Android app development. In the first part ( located here: part 1 ) we downloaded & installed Java / the Android SDK and Eclipse. This post will cover the following:
- Configuring Eclipse for Android development
- Install the latest Android SDK's versions
- Making a Virtual Android device
After this post you will be able to continue to the first tutorial: [Beginner tutorial: Hello World]. So lets start with opening Eclipse if you don't already have it open!
Configuring Eclipse for Android development
We almost have all the tools for Android app development. Before we can start coding we need to do a few things. The first is: installing the ADT plugin.
- Start Eclipse, then select Help > Install New Software....
- Click Add, in the top-right corner.
- In the Add Repository dialog that appears, for the Name enter "ADT Plugin"
- Enter the following URL for the Location: https://dl-ssl.google.com/android/eclipse/
- Click OK.
- In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
- In the next window, you'll see a list of the tools to be downloaded. Click Next.
- Read and accept the license agreements, then click Finish.
- When the installation completes, restart Eclipse.
After you restart Eclipse you will have to modify the ADT plugin preferences to point to your SDK location. Lookup the install path and do the following:
- Select Window > Preferences... to open the Preferences panel
- Select Android from the left panel.
- For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
- Click Apply, then OK.
We're almost done! After the last restart of Eclipse you might have noticed a new icon in the toolbar ( see image ). We need to download some packages before we can start with the tutorials. Click on the icon and the "Android SDK and AVD Manager" will load. Follow the instructions below to install the packages we need.
- Click on Available packages
- In the pane on the right: click in the checkbox in front of Android Repository
- This will check all the SDK's to be installed.
- Click on Install selected
- Enable the Accept all box
- Click on Install
The SDK and AVD Manager will start downloading the packages! While we wait for the downloads to finish we can do something else . Lets figure out what AVD stands for!
Making a Virtual Android device
In the Android SDK and AVD Manager we can do 2 things. 1 = installing / updating pagackes ( SDK's ) 2 = creating AVD's a.k.a. Android Virtual Devices! If we want to develop we need to create atleast 1 device. Lets start en make a Gingerbread ( Android 2.3 ) virtual device.
- In the left list click on Virtual Devices
- Click on New
- Type in a name for your device
- ( I like to take the commonly used names that correspond to the Android version )
( Eclair / Froyo / Gingerbread / Honeycomb etc. )
- Pick a Target ( aka SKD version ).
- Click on Create AVD
- Click on the AVD you just created
- Click Start
The device will load and you can play with it like a normal phone/device. Note that AVD's load slowly just go and make a new cup o coffee while you wait.
You are now ready to begin with the ultimate Beginner tutorial: Hello World!
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)