In this post I will go step by step through the setup of your development box for Android and all its goodness. I start with fresh install of the newest and shinest Ubuntu platform 9.04, which by the way on the first look is just great. I’m a happy owner of G1 for a few months and this is the best phone I ever had so why not start writing some software on it!
Before installing anything please run the following command (actually 2 commands)
Install Java! You develop on android or not Java is a must on all my machines 🙂
You can now check your java installation by issuing two commands:
You should be able to see output stating that you have java 6 installed, huuraaayy!
Download and install Android SDK
You can download the latest android SDK from the android development website (developer.android.com), the link to the latest version is here
After your download completes, unzip the file to the directory of your choice. I copy the whole folder into my home directory but the doesn’t really matter.
Open up your favourite text editor (VIM of course) and add the following line at the very bottom of the .bashrc file:
Download and Install Eclipse
I wish I could go for the easy one here and download the version using apt-get but unfortunately not as the version in repos is 3.2 and ADT plugin requires version 3.3 or higher. You have to download the eclipse for www.eclipse.org and unpack it. Once unpacked its ready to use!
Download and install Eclipse plugin
This is instruction from the developer.android.com with one small modification, instead of https use http:
1. Start Eclipse, then select Help > Software Updates….
2. In the dialog that appears, click the Available Software tab.
3. Click Add Site…
4. Enter the Location:
If you have trouble aqcuiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).
5. Back in the Available Software view, you should see the plugin listed by the URL, with “Developer Tools” nested within it. Select the checkbox next to Developer Tools and click Install…
6. On the subsequent Install window, “Android DDMS” and “Android Development Tools” should both be checked. Click Next.
7. Read and accept the license agreement, then click Finish.
8. Restart Eclipse.
After executing all the steps above you are ready for Android development. The last step in this tutorial is to run example android projects on your linux dev machine.
If you encounter an error saying :
An error occurred during provisioning.
Cannot connect to keystore.
Please check your java version. If its set to 1.5 than please run the following command:
Once you finish installing required plugins, restart your eclipse and go to Window->Preferences->Android and set up a path to your android SDK
Check your configuration
If all went fine you can try to develop Hello World application in android. You can find the instruction on the android development site:
More android tutorials to come!
Leave a Reply
No Releated Posts