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.
1 Answers
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.

- 117,780
-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 06 '12 at 16:56openjdk
--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 06 '12 at 17:04To 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 06 '12 at 17:10javac -version
from the command-line to check that it's installed, andfile /etc/alternatives/javac
to check that it's really provided by the JDK. By the way, I added information about installing the Android SDK to my answer. – Eliah Kagan Jun 06 '12 at 17:17.ks
files--can you explain in greater detail? – Eliah Kagan Jun 06 '12 at 17:20openjdk-7-jdk
rather thanopenjdk-6-jdk
, the version number should start with 1.7 (probablyjavac 1.7.0_03
). What's the output offile /etc/alternatives/javac
? – Eliah Kagan Jun 06 '12 at 17:23symbolic link to `/usr/lib/jvm/java-6-openjdk-amd64/bin/javac'
– csbl Jun 06 '12 at 17:24openjdk-6-jdk
installed, then. You can either keep using that (it will work fine for this purpose) or, if you prefer, switch to the openjdk usingupdate-alternatives
(I recommend that Eclipse not be running when you do this). – Eliah Kagan Jun 06 '12 at 17:31[2012-06-06 18:44:40 - contactManager] /home/catia/android-sdks/platform-tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
– csbl Jun 06 '12 at 17:46