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

step7: 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
34 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
what does this 5554 means???
It means the port to which the emulator is connected. You can use it if you want to launch adb commands over that emulator.
okay gone through the post, need to upload the entire code for getting the result. If any problem comes while performing the code, i will definitely write it to you.
thanks a lot boss thanks a lot...
You forgot to add:
import android.widget.TextView;
"And between note that emulator takes almost 5 mins to launch show the output so be patient and wait for 5 mins after starting the emulator."
That seems odd to me, is there a reason it's taking 5mins to launch. Will it take that long every time or just the first time emulator is launched?
My bad i forgot to add "First Time" in that sentence.
Hi Friends,
I run Your Code , But it shows the Default Window
of the emulatornot the code implemented in our sample. I am using windows XP , please Advise me
where I have Fault. Reply me at : anes(dot)pa@gmail.com
Thanks , for much information,
Sadly, doesn't work for me. Emulator launches but app does not run. :-(
Keep sharing such a wonderful information..!
Great
Sir, Appln will run... Bu always shown output as "android", even if i change the text in code ("ob.settext("asdas");)it also print ANDROID why??
I recently came accross your blog and have been reading along.
I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Thanks Budd..............
Very nice,
this is the best blog i seen ever
thanks a lot
its superb....,
Thnks... for the first tym i got introduced with android... thanks to u.... now i can go ahead with it....I have a project for my MSC IT
i like topic. Thanks!
Cool post! Its has become so easy to make a simple app now!! I have also Put a very simple explanation here for a simple hello world app! http://farasbee.com/blog/2012/03/07/developing-a-android-app-without-a-laptop-or-a-computer/
Great article, awesome resource
Really good one for beginners....
Awesome work dude..... really nice way to explain all the steps. . . . This is the good example for a developer who is really eager to start android applications
Thanks Bro. Nice Article
hi all,
Am using netbeans while running my andriod projects the andriod emulator is not integrating with netbeans.
Wat should i do to integrate.?
Very helpful information easy and clear..
"5 mins to launch show" is there any way to reduce this time because it is waste of time. By installing new SDKs can we improve this time?
If you already have an android device you can use the app called "AIDE" (Android IDE)
Thanks for the clean explanation.. This website http://www.compiletimeerror.com/2012/12/creating-first-androidapplication-in.html also addresses something similar.. Have a look, may help..
Post a Comment