Your decision to start development on a new platform depends on how easy it is to write a “Hello World”. This tutorial helps you set up the development environment and write “Hello World” in few easy steps. This tutorial assumes that you are already familiar with eclipse and its installation.
Step 1: Download and Set up New Eclipse Classic 3.5.2
Step 2: Installing Android Development Tools (ADT) Plugin
The first thing we need to do is to install Eclipse Plugin named Android Development Tools (ADT).
Its very simple to get this plugin installed. Just Open Eclipse IDE , move to Help>Install New Software…
An Install window will appear with Available softwares. Now enter following link provided by Google in Work with Field:
https://dl-ssl.google.com/android/eclipse/
A new update link will appear put a check mark and click on Next to start installation. After installation the Eclipse IDE would require a restart.
Step 3: Installing Google Android SDK
Now we are to Download Android SDK. It would be in zip format extract it first and then go to Eclipse, go toWindow > Preferences. Here you will see the link for Android just after General. Click on Android link, you will see an input box for locating the Android SDK. Say you have downloaded SDK in D Drive (in case of windows) now click on Browse and locate the extracted directory of Android SDK as shown below:
Step 4: Add Android Platforms
Next step is to install one or more Android Platforms like 2.2, 2.1 or some old. Go to Window > Android SDK and AVD Manager then go to Available Packages and select at least one Android Platform and click on Install Selected button:
Step 5: Create New Android Virtual Device (AVD)
Now we need to create a Virtual Device to run Android Application on Android Emulator. Go to Window > Android SDK and AVD Manager and select Virtual Devices. Click on New to create a Virtual Device, give it someName and select Target Android Platform from the drop down list:
Now you are ready to go with Your First Hello World App.
Step 6: Creating First Android Project
Create a new Project File >> New >> Project , a new wizard will appear to select project type, select Android Project from Android and click Next from the wizard. Now you are to specify Project Name. A directory with this name would be created in yous system. Next is the Package Name the namespace actually where all your code will go. Standard domain style is used for naming. Then Activity Name it is the name of the class that is created by ADT, the plugin we installed. And Application Name that will appear as title of your app. For example my settings are like:
Project Name: AndroidHelloWorld
Package Name: com.getsolved.android
Activity Name: HelloWorld
Application Name: My Hello World App
Now Click on Finsh. If the Finish button is inactive make sure that your are not missing any information discussed above and the Pakage Name follow the domain style.
Step 7: Running Hello World App
Now click on dropdown next to run button, select Run Configurations, Double Click on Android Application, it will create new configuration. At right side just browse the the application you just created and click on Run button. Here you will see your output.
No comments:
Post a Comment