Of course you can.The Android SDK can be installed in Ubuntu/Linux with no problem.
Here is the installation process/tutorial:
1)Installing Eclipse And Prerequisites
Open Terminal and type sudo apt-get install openjdk-6-jdk eclipse ruby rubygems ruby-dev git ant libxml2 libxml2-dev libxslt-dev
This command will install the eclipse IDE,in which you will develop your android apps,openjdk,ruby and xml.
Notice that the Eclipse version from the software center is older than the latest Android SDK Version and they will be unable to integrate together.You should head to eclipse.org and Download the latest linux version from there.Here is the Link to the direct download link.
2)Installing the Android SDK
Install the Android SDK by heading to the Android SDK Page. Choose the linux version for i386 architecture.
After downloading the file,you have to un-compress it with the following command:
cd ~
wget http://dl.google.com/android/android-sdk_r18-linux_86.tgz
tar xvfz android-sdk_r18-linux_86.tgz
This will give you the directory android-sdk-linux_86 in your home directory.
We must add the $HOME/android-sdk-linux_86/tools directory and the $HOME/android-sdk-linux_86/platform-tools directory to our PATH variable which we do as follows:
Open the Profile file using gedit with the following command:
gedit ~/.profile
Add the following to the end of the file:
PATH="$HOME/android-sdk-linux_86/tools:$HOME/android-sdk-linux_86/platform-tools:$PATH"
To make this change effective,run :
export PATH="$HOME/android-sdk-linux_86/tools:$HOME/android-sdk-linux_86/platform-tools:$PATH"
Now start the android SDK by typing:
android
3)Installing the required packages
Select Available packages
in the left panel and then select Android Repository
in the right panel to download SDK packages:
The packages that belong to the Android Repository
group should now all be checked. Click on the Install Selected
button:
At the new window that will popup,click Accept
and then Install
. When the installation finishes,close the window.
4)Integrating The Android SDK Into Eclipse
Open Eclipse which is located at the programming tools.
Click on OK
if you see the Workspace Launcher window.
Head to Help->Install new software...
The Available Software
window opens. Click on the Add...
button:
A small Add Site
window opens. Fill in the following values and click on OK:
Name: `ADT Plugin`
Location: `https://dl-ssl.google.com/android/eclipse/`
In the next window, click Next
,accept the license agreements and then click Finish.
Your packages are now installed.It is recommended to restart eclipse after the installation.
There is also a final step.Head to Help->Preferences
In the Preferences
window, select Android
in the left panel, and then click on the Browse...
button that belongs to the SDK Location field in the right panel:
Select the directory where the Android SDK is located and click on OK
.
Back in the Preferences window, click on Apply (you should then see the supported Android versions in the Target Name column) and then click OK
.
Setting Up the Emulator
Type in terminal android list targets
.
This command will reveal all the android versions that are available.
Go to eclipse and go to Window->AVD Manager
.Add and remove Android Emulators from that window that will popup.When your app is built and you click Run->Run
the emulator will open containing your fresh application.