- To use Synaptic, start Synaptic, enter your password, then type 'eclipse' into the search box. The entry for Eclipse will appear - mark it for installation, and the rest of the additional items, and then click on the 'Apply' button. Wait for download and install process to finish, close Synaptic and you are done!
To use the command line, start a terminal, and type:
sudo apt-get install eclipse
Type 'Enter' when prompted, wait for the packages to be downloaded and installed, close the terminal and you are done!
- Before you start Eclipse, you need to determine whether the necessary SWT (Standard Widget Toolkit) libraries link are set properly - else Eclipse will complain that it cannot start because it cannot find the swt library. Check the following location in you home directory for 32-bit Linux Mint by typing the following command in a terminal:
For a 64-bit Linux Mint, the command is:
If you see a message like that shown below, then the swt directory does not exist.
ls: cannot access /home/
/.swt/lib/linux/x86/: No such file or directory
To create the swt directory on a 32-bit Mint, execute:
mkdir -p ~/.swt/lib/linux/x86/
To create the directory on a 64-bit Mint, execute:
mkdir -p ~/.swt/lib/linux/x86_64/
On the other hand, if the swt directory exist, but nothing is listed (ie, no file links in that directory), then the necessary links are not set. if this is so, execute the following command:
For 32-bit Mint:
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/
For 64-bit Mint:
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/
Verify that the file links are set using the ls command again - if set, you should see the following file links:
- Start Eclipse, then answer the prompt (see below) to set a workspace - 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 - then click OK.
Eclipse will start loading and you will then see a screen like the one shown below.
Click on 'Workbench' (near top right corner of the screen) and the main workbench screen will appear (see below).
- Click on Help (on the top menu bar), then on select 'Install New Software'. A new window called 'Available Software' will pop-up (see below) - click the ‘Add’ button at the top of the window. An “Add Repository” window will pop up. Pick a name, (I chose ‘ADT Plugin’ - ADT stands for Android Development Tools), then enter the following URL in the ‘Location’ box and click OK.
NOTE: If you have trouble acquiring the plugin, try using "http" in the URL, instead of "https". For security reasons, https is preferred.
The window will close and a 'Pending' message will appear on the Available Software window - this indicates that the software is checking the URL for the plug-ins. When this is complete, you will see the 2 items listed (see below).
Select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded (see below) - click Next. Read and accept the license agreements (see below), then click Finish. The plug-ins will be downloaded and installed.
NOTE: Click OK if you get a security warning saying that the authenticity or validity of the software can't be established.
At the end of this process, you will be prompted to restart Eclipse - do so. When you arrive at the main workbench, you will see a window (see below) welcoming you to Android development - here you will have to configure the Android SDK.
Since we have already downloaded and installed the Android SDK (see my previous blog), all we need to do here is specify the location of the SDK which happens to be '/home/<username>/android-sdk-linux'. Then click 'Next' - the next screen (see below) will ask you whether you want to contribute to Google's usage statistics - select 'Yes' or 'No' and then press 'Finish'
That's it - you are now ready to start developing Android software on your Linux Mint 13. My next blog will show you a simple 'Hello, World' project, a few sample projects and will also describe some of the resources you can use to start program development on Android.