I had been playing around with installing the Eclipse IDE (arguably the best Java IDE around) and the Android SDK on my previous Ubuntu installation and basically made a hash of it a few times. Having refined my process I’ve decided to write it down so that I don’t forget Following my clean installation of Ubuntu 10.04 I needed to get my development environment sorted out, and this meant installing Eclipse and the Android SDK and then wiring them both together.
When downloading the IDE I opted for the ‘Eclipse IDE for Java Developers’ because essentially Android is a set of libraries built on top of Java, so it seemed like a good place to start. Note that I’m using Eclipse 3.5 (Galileo) for my development.
The installation process for Eclipse is a simply case of extracting the downloaded archive into a suitable location, I’ve created a folder called Applications in my /home/Develop directory and extracted the archive into it. Double clicking on the eclipse executable file kicked off the IDE which loaded quite quickly after prompting my for a workspace location – I just kept the default.
So that’s Eclipse sorted, now what about the Android SDK?
After downloading the SDK it too is installed by simply extracting into a suitable location, again I extracted it into my /home/Develop/Applications folder. But we are not quite finished yet – we need to use the SDK Manager to download and install at least one Android development platform first (read the ‘SDK Readme.txt in the folder when you extracted the SDK for more details). This is a simple case on executing the [SDK Folder]/tools/android file either via the command line for by double-clicking it. The SDK and AVD Manager will now load and I simply selected the ‘Available Packages’ option, selected everything in the right-hand pane and clicked on ‘Install Selected’. After a length installation process I was done – this is my SDK/AVD Manager after the installation completed.
So that’s it, we’re there yes? Well no, not yet. In the Windows world we are used to installations detecting the presence of IDEs or vice-versa and everything just working once the installer finishes. Well Linux is not like that we need to so some additional configuration before we can get coding; in fact Eclipse/Android installation is pretty much the same on all platforms, so it’s not just an Linux thing.
The first thing to do is to install the Android ADT (Android Developer Tool) plugin into Eclipse – which you’ll be happy to hear is a semi-automatic process.
- Start Eclipse and select ‘Install New Software’ from the Help menu.
- Click the ‘Add’ button next to the “Work With” dropdown list
- Enter a suitable name for this resource, e.g. Android Developer Tools, and the following URL into the location:
- Click Ok
Eclipse will now search for the ADT plugin and all things being equal will display a screen similar to this:
Select the ‘Developer Tools’ checkbox (which
will select the DDMS and Development Tools beneath it) and click next. After agreeing to the Licence Agreement (which of course you read first) click Finish and the installation will proceed.
You may get a security warning at this point because the packages are apparently unsigned but I just clicked OK to carry on. All things being equal you will be prompted to restart Eclipse and the installation process is then complete.
Selecting File | New you will see ‘Android Project’ displayed and clicking it will display the following window:
Now I’m still new to Android development so I’ll not inflict my poor knowledge of what you need to enter into this screen – you probably know better than me at the moment anyway
What I can say is that I managed to complete the obligatory ‘Hello World’ application from my copy of ‘Professional Android 2 Application Development’ book by Reto Meier so I must have it set up somewhere near right.