Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm new to to Linux, in this particular case, to Ubuntu. I have a small android project I have to finish until this Friday and I'm still stuck with the install and preparing of the development environment. The only thing I did was install the Eclipse IDE. I'm still missing the SDK, JAVA and anything else that might be needed. Can someone help me through this? It's only because I'm running out of time to develop, or else I would embark on a deeper investigation of this OS.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Installing the Android SDK to use with Eclipse works the same way on Ubuntu as it does on other Linux-based operating systems. You should follow the instructions in the official documentation.

As of the time of this writing, that means you'll download this SDK package, then follow the instructions in Installing the SDK.

Install the Android SDK Itself

To summarize the Android SDK installation instructions, you'll download the SDK, unpack it wherever you want it, and remember where you unpacked it because you'll be providing that information in Eclipse later, when setting up the ADT plugin (see below). If you have no other preference, a good place for the Android SDK is directly in your home directory (not the Downloads folder it may have been saved to, but to the home directory, which contains your downloads folder, your Documents folder, your Desktop folder, and so forth). To extract the Android SDK, put the .tar.gz file wherever you want it, then right-click on it and click Extract Here.

  • The Android SDK contains 32-bit programs and libraries. This is fine even if you are running the 64-bit version of Ubuntu. But if you're running the 64-bit version of Ubuntu, you probably only already have the 32-bit versions of the libraries that the Android SDK relies on installed. The easiest way to install the 64-bit versions of these libraries is by installing the ia32-libs package. This works on all versions of Ubuntu. See this question for details.

Install a JDK If You Don't Have One Already

The installation instructions give you a link to where you can download Oracle's proprietary JDK (Java). If you choose to use the Oracle's proprietary JDK, this answer explains how to install it from the command-line with the packages available on Oracle's website.

  • If you prefer to use the OpenJDK, you can install do this by installing the openjdk-7-jdk package in the Software Center ...or by running this command in the Terminal (Ctrl+Alt+T):

    sudo apt-get update
    sudo apt-get install openjdk-7-jdk
    

    The installation instructions say to use JDK 6 (which you can do by installing openjdk-6-jdk), but they link to version 7 of Oracle's proprietary JDK, so the Android SDK will probably work fine with the latest OpenJDK as well.

The installation instructions explicitly recommend that Ubuntu users see the community documentation on Java and Java installation, if experiencing any problems.

Install the ADT Plugin for Eclipse

As explained in the installation instructions, you'll install the ADT plugin for Eclipse, which is what lets you use Eclipse to develop Android applications.

Install Android Development Packages In Eclipse

In Eclipse, you'll pick what Android development packages you want to install. Different packages are required for targeting different versions of the Android operating system for different devices, and for using various additional functionality implemented by some mobile device manufacturers. You can have however many of these packages installed at the same time as you wish (although if you select a lot of them, it may take a while for them to download and install before you can begin developing for Android). The installation instructions explain how to decide what you need.

share|improve this answer
    
I downloaded both: -jdk-7u4-linux-x64.tar.gz and -android-sdk_r18-linux.tar.gz How do I install them? Just unpack them? If so, to where? Home\PersonnalFolder? If not, then how? –  csbl Jun 6 '12 at 16:56
    
Ok, I understand why the ADT plugin gave the error message...I didn't have the jdk installed...And still haven't. You say that the open jdk works the same? Do I have to add or configure any variable environment? –  csbl Jun 6 '12 at 17:01
    
@csbl I think those errors are actually because you didn't install the Android SDK, not because you didn't install the JDK (though you do have to do that too). You should only have to do post-install configuration for a JDK yourself if you have more than one JDK installed and want to change which one is the default. It should work fine with openjdk--that's what I've used to make Android apps using Eclipse. But Oracle's proprietary JDK will work fine too and this explains how to install it from the .tar.gz file. –  Eliah Kagan Jun 6 '12 at 17:04
    
After those instructions, I think I'll pass and execute the commands: 'sudo apt-get update sudo apt-get install openjdk-7-jdk'. To which folder or directory should I unpack the 'android-sdk_r18-linux.tar.gz'? Mine is on the 'Path Home\PersonnalFolder'. Within that 'android-sdk_r18-linux.tar.gz', after unpacked, there is nothing on the 'platforms' folder. It should be empty? One last, stupid question...Is that all I have to do? Extract it? It's the problem of being used to the windws *.exe... –  csbl Jun 6 '12 at 17:10
    
I just executed the two steps you gave me for openjdk7. Anything else I should do about the installation of the jdk? The environment variable path? If so, how to? –  csbl Jun 6 '12 at 17:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.