If you’re developing Android applications on the Macintosh and you want to use Rational Team Concert (RTC), you’re in luck. There’s an RTC incubator for the Mac, and you can install this along with the Android SDK into the same Eclipse client.
If you’re using Android and RTC on Windows, see How to Set Up RTC for Android Development on Windows.
The RTC 18.104.22.168 Incubator for Macintosh isn’t an official release yet, but I’ve been using it for a while and it works great. What’s more, it’s easier to install RTC and Android together on the Mac than it is on Windows.
The first concern when installing Android is getting the Java JDK. Unlike Windows, the Mac comes with its own Java JDK installed, and it gets updated automatically via Apple Update (yea!). I used version 1.6.0 for these instructions. Type java -version in a terminal window to see what version is installed on your machine.
Download and Install
Download the Android SDK for the Mac. You can place it anywhere, but I usually place the Android SDK at the top of my directory structure. This keeps the path short. Move the downloaded zip file to the top directory of your disk drive and unzip it, then throw away the zip file. You should see the Android SDK directory at the top level directory on your drive.
Add the location of the Android tools directory in the SDK to your path in the .bash_profile file. For example, PATH=/android-sdk-mac_x86/tools:$PATH. If you’re unfamiliar with adding locations to your PATH on the Mac, see this tutorial.
Install the Android Dev Tools Plugin
Add the ADT installation site to the list of Eclipse install sites and install the plugins.
- Select Help>Software Updates>Available Software
- Select Add Site…
- Enter the location https://dl-ssl.google.com/android/eclipse (use http: if https: doesn’t work).
- Select everything under the site you just entered, then select Install.
- Restart RTC when prompted.
Add the location of the Android SDK
- Select Rational Team Concert>Preferences>Android>Browse.
- Navigate to where you placed the Android SDK directory.
- Select OK.
- Select the AVD Manager (toolbar or menu option) and load the Android platforms you want.
- Exit RTC.
Command Lines and Eclipse.ini
You don’t need to read this section to install RTC and Android on the Mac, but it has some interesting observations on how Eclipse needs to be installed on the Mac.
Unlike RTC on Windows, you don’t need to change the JVM that’s used in the eclipse.ini file. There’s no reference to any IBM JVM info in the Mac eclipse.ini for RTC on the Mac.
We added a number of command line options when we installed RTC and Android for Windows. We needed to increase the memory RTC allocates by default, and we allowed for launching multiple instances of RTC (Eclipse). The Macintosh doesn’t use command line options so we need a different strategy.
Unlike Windows, applications on the Mac can (usually) open multiple sessions for a single instance of an application. However, Eclipse doesn’t work this way. As explained in the previous article, Eclipse can use command-line options to launch multiple instances of the application with different configurations. The Mac doesn’t do this, so the result is that we don’t have the notion of command-line options for Eclipse on the Macintosh platform. If you want to run different configurations of RTC (for example one with Android installed and another without Android), you’ll need to install RTC again into a different location and edit that installation’s eclipse.ini file (if necessary) to reflect the alternative installation that you want.
In other words, you need to have an additional RTC installation on your machine for each configuration you want to set up. This scenario usually isn’t necessary, but it’s a solution if you need it.
Initially I thought we’d need to add the same options in the Mac’s eclipse.ini file as we did in the Windows command line. The good news is that those options are already there! Sufficient memory is already allocated for RTC to run with Android in Eclipse. So for the purposes of writing Android applications in RTC, no editing of eclipse.ini is required.
If you need to edit eclipse.ini, hold the ctrl key and click on the eclipse.exe file for the RTC installation you want to modify. Select Show Package Contents, then select Contents->MacOS. This displays the eclipse.ini file, which you can double-click to edit.
Develop for Android
Now you’re ready to develop for Android and use RTC in the same Eclipse shell.
If you’re moving to RTC 3.0, locate the RTC 3.0 incubator for the Mac in the download page for the latest release on jazz.net.
- How to Set Up RTC and Android on Windows
- RTC 22.214.171.124 Incubator for Macintosh
- Running Rational Team Concert on Mac OS X
- Android SDK for Macintosh
- Editing the PATH file on the Macintosh