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.
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.
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
- 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-libspackage. 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-jdkpackage 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.
Install the ADT Plugin for Eclipse
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.