6

Can i use the android sdk packages (both the images for emulator and the sdk patform for ICS) in a Ubuntu android sdk directory.

This is in effect to the large download size of the packages which i dont want to download again. Will simply copying those packages and images to the linux android-sdk-linux directory do the work?

3 Answers 3

5

It is impossible to use android sdk for windows in Ubuntu .You have to download android sdk for linux . For installation procedure refer Nickola's answer

2

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.

2
1

Yes, you can copy android-sdk packages from windows to linux. Except the SDK tools and platform tools you can use them all

  1. Download the android-sdk_rxx.x-linux.tgz and extract to a location which can be accessed by all users.
  2. Copy all the folders in the android-sdk(from windows machine) except the folders that contain *.exe files and paste inside the extracted android-sdk-linux in step 1.
  3. Then start eclipse and install the ADT Plugin, then select Help > Install New Software.(refer this link).
  4. Configure the ADT Plugin:
    Once Eclipse restarts, you must specify the location of your Android SDK directory:
    In the "Welcome to Android Development" window that appears, select Use existing SDKs. Browse and select the location of the Android SDK directory you recently downloaded and unpacked(location in step1). Click Next.

Your Eclipse IDE is now set up to develop Android apps, but you need to add the latest SDK platform tools and an Android platform to your environment. To get these packages for your SDK, continue to Adding Platforms and Packages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .