Purple Robot development primarily relies upon the Android SDK as well as plugins for retrieving the sourcecode from the GitHub repository. In addition to the base development environment, memory analysis plugins are also very helpful for keeping track of our running heaps.
This document describes the process to get started developing Purple Robot. It covers the tools required, software dependencies, and the checkout procedure. If any of the instructions below are incorrect, missing, or otherwise lacking in any way, please submit an issue so that I can get it fixed. This is a living document that is in progress. -Chris
Eclipse and the Android SDK require Java as a prerequisite. Download & install the latest JDK from Oracle.
If you are using Windows or Mac as your base development platform, please download and install the Android SDK bundle for your platform that Google has helpfully compiled. (Linux users, can you confirm or deny if a similar bundle is available for your platform?)
This bundle is distributed as a ZIP file without an installer, so to complete installation, extract the contents of the ZIP file to an appropriate place on your local filesystem. (Ideally a path with no spaces in any of the parent folders.)
Note that Windows gives you the option to explore the ZIP file without first extracting its contents and copying the contents elsewhere in the filesystem using drag and drop. You will experience problems starting Eclipse from this kind of installation, so instead, right-click the ZIP file, select
Extract All... and move the extracted folder to its new home on the filesystem.
Once the SDK is in place, navigate to the
eclipse folder and launch the Eclipse executable contained within.
With Eclipse open, we need to update the Android SDK packages. From the
Window file menu, select
Android SDK Manager to retrieve a list of packages and updates. Purple Robot targets SDK level 19 (Android 4.4), with a minimum SDK of 8 (Android 2.2), so install the SDK Platform and Google APIs packages for those releases. It’s also helpful to install the Google USB Driver if you are developing using Nexus devices.
GitHub for Eclipse
Next, we need to install GitHub for Eclipse. In Eclipse, open
Install New Software from the
Help menu. Add the
http://download.eclipse.org/egit/updates (EGit) and
http://download.eclipse.org/egit/github/updates (GitHub) repositories and install
Memory Analyzer (Optional)
If you wish to analyze heap files and collect other memory information, install
Memory Analyzer and
Memory Analyzer Charts from the Eclipse package manager.
From your Git Repository Exploring perspective, clone the Purple Robot repository.
Navigate to the project’s working directory and import
Purple Robot Manager. Use the New Project Wizard to create the project as an Android Project from Existing Code. Browse to
git/Purple-Robot-Manager and select
Purple Robot Manager. Rename the project from
Purple Robot and you’re almost ready for development.
Android Support Library & Google Play Services
Recent iterations of Purple Robot have switched from using ActionBar Sherlock in favor of Google’s Android Support Library for functionality like action bars. From the built-in SDK Manager, download the support library and install it as a separate project in your Eclipse workspace.
Finally, the Google Play Services library provides mapping functionality for Purple Robot. Download the Play Services via the Android SDK Manager and set it up as a separate project in your workspace.
Once all projects have been set up, be sure to add them to the Purple Robot project’s Library requirements (warning: image is out of date and missing the Facebook and Media Router libraries):
Finally, close the build settings, clean the projects, and build the project.