This post is just a quickie on how to get yourself started with Android development and the step-by-step guide about the basic tools needed to do so. Now there are many ways using which you can start development. But the simplest way is using Eclipse IDE. So, here’s a simple guide for a complete beginner.
For a complete beginner, it would be best to get eclipse and android sdk using this full-felged suite (eclipse, ADT, SDK Manager combined all together), in which case the first four steps of this tutorial can be skipped. Or download each tool separately, and continue with the steps given below.
Step 1. Download Eclipse
Although there are a lot of IDE’s that can be used to start development but eclipse is the most recommended to do so. You can download Eclipse using this link.
Step 2. Download and Install Android Software Development Kit or more commonly known as Android SDK
a. Download the Android sdk from under the Use an Existing IDE tab
b. Install/Extract the downloaded sdk to any directory
c. Go to the directory where you just installed the android sdk and open/run SDK Manager to start Android SDK Manager which should show up something like this.
d. Using this manager download the packages for the API platform for which you wish to start development. Recommended is the newest API level present in it.
e. Click the API level you wish to download and click install.
Note: Only SDK Platfom package is important to start development for an API, rest packages are optional and can be downloaded anytime.
Step 3. Download and Install Android Development Toolkit (ADT) plug-in
a. Open Eclipse and go to Help -> Install New Software
b. Now you will see a window which allows you to add new plug-ins to your IDE
c. Click on Add button and in Name write “ADT” or “Android” and in Location give the link http://developer.android.com/tools/sdk/eclipse-adt.html and click Ok.
d. In the next window select Developer Tools and next, finish.
Note: Many times this doesn’t work out so smoothly (as was in my case) so here is a simple workaround.
a. Do a manual download of ADT plugin (under download for other platforms)
b. Open Eclipse and go to Help -> Install New Software
c. Now you will see a window which allows you to add new plug-ins to you IDE
d. Click on Add button and in Name “ADT” or “Android” and using the Archive button browse to the already downloaded ADT plugin and click Ok.
e. Select Developer Tools in the next window and next, finish.
Note: You might get prompted to browse to or install the android SDK in this process to which you can browser to the already installed SDK or click cancel and follow the next step.
Step 4: Connecting Eclipse with the Already Downloaded and Installed Android SDK
a. Open Eclipse and go to Window -> Preferences-> Android
b. In the SDK Location browse to the directory where you installed the android SDK and click Apply and you are done.
Step 5. Creating Sample Android Application
a. Click File -> New -> Android Application Project or if it doesn’t appears there click other and select the same from Android.
b. Give your app a Name (say HelloAndroid), a project name (auto-filled) and a package name (auto-filled).
c. Leave the rest as it is for now and click next, next, next, next, finish.
Step 6. Creating an Android Virtual Device (AVD)
The AVD is an emulator which provides us with a software environment just like a real device where we can test our applications.
a. In Eclipse go to Windows -> Android Virtual Device Manager or from the toolbar click the icon (square icon with android logo in middle)
b. Click New
c. Give Name, Select Device (the screen size), Select Target (the android api level on which you would like to test your app), the SD Card size and click on Ok.
d. Now a new AVD is created with the specification you provided.
e. Select the newly created from the list and click on start to run the emulator and wait for the virtual machine to boot (it will take some time depending on your machine’s configuration).
f. While the machine boots you can close the AVD Manager dialog box.
Step 7. Running the Project
a. Right click on the project in Package Explorer and click on Run As -> Android Application
b. Once the AVD has started you can see the output of your first app on the emulator’s screen.
Latest posts by Abhishek Gupta (see all)
- Laravel Custom Exception Handlers - March 28, 2019
- Customizing Laravel validation JSON message format - March 20, 2019
- Time killer and addictive Google Games - March 19, 2019