About a year ago I wrote this entry about how to get the Android DDMS tool to run in Snow Leopard with a 64bit JVM.
Recently Android released a new platform so I downloaded it, as well as the latest cut of development tools. In this new release there is now native support for running DDMS and other tools in a 64bit JVM. If you followed the instructions in the above entry you will now notice that you get an error with a stack trace similar to this:
09:49:43 E/ddms: shutting down due to uncaught exception
09:49:43 E/ddms: org/eclipse/swt/graphics/FontData
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.graphics.FontData
at java.security.AccessController.doPrivileged(Native Method)
... 3 more
This is because the tools don't know which of the SWT classes to use, now that it has two in the class path. To sort this out you need to remove the environment variable ANDROID_SWT. Then the tools will automatically use the default 64bit libraries shipped with Android.
Please note that this entry has been revisited. The update is available here.
I just had the pleasure to launch the debugging tool for Android called Dalvik Debug Monitor Service. It is a tool that allows you to connect to the different VM's running on an Android emulator or phone. On OS X Snow Leopard this was unfortunately a bit more involved then I would have liked.
Not using the Eclipse IDE I was going to start this from the terminal. The Android SDK 1.5 through back an exception that I could not be bother to decipher so I decided to switch to SDK 1.6 to see how that worked. This time I was first of all requested to export a new shell variable called ANDROID_SWT so that I could create the AVD to use. I pointed this to $ANDROID_HOME/tools/lib where I found a swt.jar file. This worked and my AVD was created and started.
When I then tried to launch the DDMS tool it complained that it could not run a 32 bit SWT implementation on a 64 bit VM. OK, so I search around on the internet to find a 64 bit version of SWT. I found the SWT home page and there I found the download of the latest stable release of SWT for OS X. Great! Downloaded and installed and exported as ANDROID_SWT I got the same error! SWT does not yet support 64 bit OS X platforms as stable!
But I was in luck. I happen to have an install of the latest Eclipse IDE. This happens to be the last of the three OS X options on their download page (as a note of warning Eclipse is quite big). In here you will find the SWT plugin. This is the file you will need to get DDMS to work, I.E where the ANDROID_SWT variable should point. So if you don't want to move files around you can just point the ANDROID_SWT variable to $ECLIPSE_ROOT/plugins. If you want to copy the file to another location I copied the two SWT jar files org.eclipse.swt_3.5.1.v3555a.jar and org.eclipse.swt.cocoa.macosx.x86_64_3.5.1.v3555a.jar.
I would assume that you can download the development source from the SWT teams SVN and build it your self but I found it easier to just link to the Eclipse provided one.