Here is the complete steps to create and setup environment for android programming till writing a sample android application below are the easy step by step guide
Step1: Downloading required packages
First of all Download Eclipse IDE from Here and download Google Android SDK from Here
step2: Unpacking Downloaded Files
Now Extract the Android SDK and Eclipse and in the Drive ( D: or E:) which has sufficient space
step3: Create AVD follow below steps
AVD is Android Virtual Device (AVD) which is nothing but system image and device settings used by the emulator, to create AVD goto command prompt start-->run-->type "CMD" and press enter now navigate to the folder in which you have extracted android SDK example D:\android-sdk-windows-1.5_r2\tools and execute the below command as shown in below picture
in command prompt execute below line
"android create avd --target 2 --name my_avd "
1. Start Eclipse-->help-->Software updates..
2. In the window Select Available Software tab and click on Add site and enter Below URL
https://dl-ssl.google.com/android/eclipse/
2.if you get error remove "s" from https in url and click ok
4. Back in the Available Software view, you should see the plugin listed by the URL, with "Developer Tools" nested within it. Select the checkbox next to Developer Tools and click Install
5. Now in subsequent window, select and check "Android DDMS" and "Android Development Tools" Click Next.
step5: Now we have to point the Eclipse to the Android SDK Directory you downloaded
1. In eclipse select window-->Prefrences and select "Android" in prefrence window
2. Now find the Browse button as shown in Above Pic and point it to downloaded SDK directory and click on apply and ok as shown in above PIC
3. Restart Eclipse
step6: Creating the Sample Android Project
1. In Eclipse select menu File-->New-->Project
2. Select Android Project" as shown in below PIC
3. Fill in the Project Details as shown in below PICstep7: Writing Sample Android Program to print on screen
Click on the ceveniproject.java class or other name specified during the creation of the project as shown in the PIC below
and you can write the below code in the right hand side of the screen editor After writing the code in eclipse select
package com.ceveni.org;
import android.app.Activity;
public class ceveniproject extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("ceveni");
setContentView(tv);
}
}
Run-->Run in the Run as window select "Android Application"
that's it if your code doesn't have any error you can see the emulator with the output as shown in below PIC

5 comments:
great article
Thanks :)
great info
dude this is too good.
I noticed the change in URL...and its tarunchandel.com.
This is ths the first thing I am ging to do once i come back... came online after a long time today... have been realy busy with project..and was pleasently surprised by the new look of your blog.
MAn ...you rock!!!
thanks, very helpful
Post a Comment