How to install or configure Android in Linux - Ubuntu / Mint / Debian

Let’s talk about something about free software....
don’t get confused its android and Ubuntu....

here we will talk about installing android sdk in Ubuntu in step by step...
What u need?
1.Android emulator for Linux from their site
2.Eclipse with java for Linux which is free
3.U should have jdk(java dev kit) installed in your computer
and some space for your workspace.....
Emulator is used in order to emulate the actual android phone. It helps in running programs before we run it in actual phone. In here I only asaid about the emulator. I included the picture so always look at the screen shots…
1.At first u want to install jdk in your Linux mostly java will be installed in linux.If not then I will give u necessary information to install it)
2.After the installation u should install android sdk form http://developer.android.com/sdk/index.html
that is a simple task(but u want to update the android sdk).The Google provide a platform for working the android and we want to update it to the android platform we desire .For that
a. when we start the android sdk there will be updating task.

b. After that select the android we want.(e.g. android 2.3).
c. Then click install .(It will take some time to install)

d. After that we want to select the virtual machine and we create a new virtual machine. just follow the instruction.


3.Then install the eclipse from this link http://www.eclipse.org/downloads/ (download the java included package about 100mb).But we need to include some package for the android execution.
For that we want to include some urls from the android site itself to include the packages. It also require internet connection .Follow the steps
a.Install the eclipse
b.Open it and go help>>install new software>>Add (for Galileo eclipse)
c.Add this url : https://dl-ssl.google.com/android/eclipse/

d.Continue by clicking next and also agree the agreements
e.when it is done ,restart the eclipse

f.Then u have to link the eclipse and the sdk. So u have to go window>>Preference>>Android tab and set the sdk location .for e.g. /home/Vishnu/sdk and ,if it correct then it will display all than android platforms’ that u have installed and click apply. Then only u will be able to start the emulator.
###-this repository is added in order to get the android functions in eclipse.You will know when u start working…
Then the installation part is over.
LETS START WORKING>>>>
Lets build a first android appln
<#>Start up the eclipse and go
File>new>android project

a.select a project name



b.platform(android 2.2)

c.application name, package name(it should have two part such as a.com or a.org or etc) and a activity name too
d. click Finish

1.In new window will come .In the left panel(Package) select your project name (Look picture) and select your filename.java in under src-This is your main program file, in here u will do the program.





2.Next is the graphical part :-Go to the res>>layout>>main.xml- This is where u will do all the graphics part. It has two part
1)graphical layout- a graphical interface for drag and drop type system.

2)main.xml- A area for writing the xml code(For professional programmers)

3.Android manifest-Where u will deal with later about the permission given and also the services
An example of xml is given below (drag and drop)

FINAL part is the RUN of course
In the tab above there will be a button like play icon ar go to Run>>Run
U will probably get a Run as dialog: - select run as android and its all done

Then it automatically start the emulator
There a two important things
1.console:- it indicate all the important activities happening in the emulator




2.Logcat:-It indicate all the activity in a emulator(window>>showview>>other)

The emulator will take time to start up so don’t be afraid…

This is the welcome screen...

A sample o/p will be like this....

And u can see ur appln in the menu...



Then your first application display an the emulator
Thank you for reading this and if u has any query then please comment below

Comments

Post a Comment

Popular posts from this blog

How To Install LEX and YACC in Linux or Ubuntu

Lex Program To Check The Syntax of For Loop

Listing/Delisting of an article in to an Assortment in SAP SCM Retail