Android Development Environment Setup (on ubuntu lucid lynx)
I recently set up my own Android Development Environment and I decided to take notes. If you're on Ubuntu and you're looking for a quick way to get yourself going with Android Dev, you've come to the right place.
We'll be working with Java and we like smart IDE's so we will be using Google's own Eclipse Plugin for Android Development. This means that we need to have Eclipse installed.
Step 1: Install Eclipse via ubuntu Software Center (it's under Developer Tools / IDEs)
While that's going on(it takes a few minutes)...
Step 2: Download the Android SDK, install it anywhere you like; just make sure to add it to PATH.
Once Eclipse is installed, you will need to add a special repository from which we will download Google's Android goodies.
Step 3: Add Google's update site https://dl-ssl.google.com/android/eclipse/
In Eclipse, you do this by going to Window → Preferences → Install/Update →Available Software Sites. You have a button on the right that reads "Add." Click it, enter a suggestive name, like "Android," and paste the URL from above.
Step 4: Install the Android Development Tools.
In Eclipse, go to Help → Install New Software. From the first dropdown, select the Android repository, work your way through the Software Package Tree and select Android Development Tools. Click Next and you're done!
Now, if you encounter an error, it's OK. I did too. There are some simple steps to take care of this:
Step 5: Install Sun Java Development Kit 6 via ubuntu Software Center
Step 6: Try Step 4 again and you will probably get the following error:
"Session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install, operand=null --> [R]org.eclipse.cvs 1.0.400.v201002111343, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
The artifact file for osgi.bundle,org.eclipse.cvs,1.0.400.v201002111343 was not found."
Don't panic, like I did. This means your Eclipse installation is so bare-bones that you don't have the PDE.
Step 7: Install Eclipse Plugin Development Environment via ubuntu Software Center or using this spiffy command:
sudo apt-get install eclipse-pde
Step 8: Try Step 4 again and it should all work fine.
Step 9: Do small victory dance!
You are now free to roam in the world of Android Software Development!
If you're new to the Android Platform, I highly recommend you read through the online Dev Guide.