- Download and install JDK from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Download and install Eclipse Helios: http://www.eclipse.org/downloads/ If you already have Eclipse installed make sure you have the latest updates.
- Download and install the Android SDK http://developer.android.com/sdk/index.html If you already have the Android SDK installed make sure you have the latest updates.
- On start up Eclipse will ask you to create a working directory. Once you have done this install the ADT plugin to Eclipse as follows: Select Help > Install New Software. Click Add, in the top-right corner. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/ If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons). Click OK. In the Available Software dialog, 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. Click Next. Read and accept the license agreements, then click Finish.When the installation completes, restart Eclipse.
- In Eclipse click onWindow/Preferences/Android and set the SDK location to where the SDK was installed (probably C:\Program Files\Android\android-sdk-windows).
- Download and install Hg from mercurial: http://mercurial.selenic.com/wiki/Download
- Have a cup of coffee (still some way to go!)
- Create a clone of the latest sl4a repository: Use windows explorer to create a directory where you will store the clone. Hold down the shift key and right click on the directory then open a command window. In the command window type: hg clone https://rjmatthews62-android-scripting.googlecode.com/hg/ and some time later your clone will be there. The repository gets updated regularly so use 'hg pull -u' to get and update the latest repository. Exit the command window.
Saturday, February 12, 2011
Having completed my first python script using sl4a on my HTC Desire I decided the next step was to create an APK (Android PacKage) to make it easier to download and run. The process is not that easy (but easier than writing the whole thing in Java) so the following explains how it was done on my PC running Windows Vista: