If Eclipse from Ubuntu's repository has already been installed it still be used as the Android program development - just ignore the sections on installing and proceed to installing the ADT into Eclipse as outlined in Part 2.
The install process is very straightforward depending on which Eclipse you select to use. For this first part, I will describe the procedure for installing Eclipse from Google's ADT bundle.
- First head over to:
and download the latest ADT bundle - make sure you download the correct 32 or 64 bit version:
- Start a terminal and unzip the downloaded file:
This will create a new folder 'adt-bundle-linux-x86' (or adt-bundle-linux-x86_64)in your home directory containing all the unzipped files. Note that by installing ADT and Eclipse in the home directory, only the current user can use them. If, however, you want Eclipse to be accessed by other users, then you may have to install the version from Ubuntu's repository.
To start Eclipse, execute in a terminal:
Since this is the first time Eclipse is started, it will prompt you for a workspace directory - I use '/home/
(username)/Projects/Android (where username is your login name) but you can place it anywhere you like or accept the default of /home/ (username)/workspace. You can also set this as the default and not ask again - then click OK.Workspace Launcher
Eclipse will start loading and you will then see a screen like the one shown below.Welcome screen
Read through the welcome message - when done, close it and you will see the actual Eclipse screen as shown below.Eclipse main screen
That's it! Eclipse is already loaded with the Android Developer Tools plugin and the SDK is ready to develop Android software.
If you have started Eclipse from the command line (as above), do not be alarmed by a series of error messages in the terminal (for example: watch_submenu: assertion `GTK_IS_MENU_SHELL(menu)' failed'). These seem to be harmless as Eclipse worked fine - at least it was in my case.
For now, close Eclipse by either clicking on the 'Close' button, or from the menu (File > Exit).
Note that at the moment, you have start a terminal. change to the adt-bundle-linux-x86/eclipse/ directory and execute the ./eclipse command everytime you wish to start Eclipse. To make life easier, you can also place a launcher for Eclipse in Unity's dock. To do this:
Open a terminal and execute:
sudo gedit /usr/share/applications/EclipseADT.desktop
In the gedit editor window, copy and paste the following text:
Comment=Eclipse and Google Android Developer Tools
Change the items necessary for your system - for example, the location of the eclipse executable (mine is '/home/ridz1/adt-bundle-linux-x86/eclipse/eclipse' - yours may be different. Also make sure that the location of the icon for Eclipse is valid - use the one found in the /home/ridz1/adt-bundle-linux-x86/eclipse/ directory - the file is called icon.xpm. Save and close gedit.
Now click on the Unity dash and enter 'eclipse' in the search box. The Eclipse ADT will be displayed - click on the icon to start the program. The program will run and the Eclipse icon will appear as an item in the dock. Right-click on that item and select 'Lock to Launcher'. Viola! You now have a Unity dock with the Eclipse ADT permanently present. The screenshot below shows my Unity desktop in all it's glory.
That's it - you are now ready to start developing Android software on your Ubuntu 12.04. My next blog will be Part 2 of Eclipse+Android on Ubuntu 12.04, where I will describe how to install Eclipse from Ubuntu's repository and how to install Google's ADT for Eclipse.