15.8.10

Getting Started with the Android SDK in 10 minutes

This document is a brief primer on how to configure Eclipse for Android development. Eclipse is the standard IDE by the Android project. This document describes how to configure that (which is more elusive than one would think if they don’t know where to look) in a few easy steps and save the reader a bit of time.
Google has plenty of documentation on this subject of how to configure the Android SDK and Eclipse IDE for Android development, and I suggest you read them. This guide should help save you a bit of time in getting set up quickly rather than doing a lot of reading and questing.

Step 1) Download Eclipse



The Eclipse IDE is needed in order to begin configuring the Android SDK. Although can Android applications can be developed without the Eclipse IDE, it is probably easier to develop with the Eclipse IDE. Eclipse is available here.

Step 2) Download the Android SDK


Download the Android SDK for your respective platform from   http://developer.android.com/sdk/index.html. Install it into a location that is easily organized. My configuration is on a Mac, and I have the Android SDK location at /Developer/OtherSDKs/Android.
Step 3) Install the necessary platform packages for Android development


a) Change your directory to the SDK home by executing:


cd android-sdk-r06-mac_86

b) Execute the Android SDK and AVD Manager with the following command:


somedevhost:android-sdk-mac_86 msacks$ tools/android Starting Android SDK and AVD Manager No command line parameters provided, launching UI. See 'android --help' for operations from the command line.

i) Navigate to “Available Packages” and download the packages for the version of the Android platform you would like to code to. I prefer to only download Android 2.1 and 2.2 packages.
Android Packages
i) Click the “Install Selected” button and read and accept the license agreement if you agree. The platform development packages will then begin to download.
Step 4) Create a Virtual Device


Now we will create a virtual device which the emulator can deploy code onto as an .apk file for testing developed applications. This is the last step before we are ready to fire up Eclipse and install the plugins for Android development within Eclipse.
a) Navigate to “Virtual Devices” in the Android SDK and AVD Manager
b) Click “New”, and a dialog box called “Create new Android Virtual Device” will appear
New Android AVD
c) Enter the name, target platform, SD card size (not required), and screen size of the device
d) Click “Create AVD” to create the new AVD

e) A dialog box will appear stating that the AVD creation was successful and the new AVD will appear in the list of available AVD’s
Step 5) Install the ADT Plugin for Eclipse


Now, add a remote update site to install the Android Development Toolkit plugin for Eclipse so Eclipse recognizes Android project files and adds additional features for Android development to the Eclipse IDE.
a) Open Eclipse and Navigate to Help->Add New Software
b) Click “Add” to add a remote update site
c) Enter “Android” for the name and “https://dl-ssl.google.com/android/eclipse/ for the Location.
d) Select “Developer Tools” from the available sites and install the upgrades
Android Eclipse ADT
e) Restart Eclipse
Step 6) Create a New Android Project


Now you will be able to create a new Android project by adding the parameters for your new Android application. At this point the reader should have everything they need in order to begin writing Android applications. The “Hello World” application on the Android developer site is a great starting point for new Android developers.
a) Ensure that the installation was successful by navigating to New->Project and verifying that Android is an available selection for new projects
New Android Project
b) Enter the Project Name, Select the Build target (which is one of the AVD’s created earlier, the Application name, package name, and a default activity (optional)
Share:

0 comments :

Post a Comment

Mari komentar dan berdiskusi...