Tag Archives: terminal

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:

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.

1 Comment

Ever wanted Maven to print the test output to the terminal to save yourself from digging around in the surefire report directory to find out what happened with the failing tests? I have many times but have never invested the time to find out how until now.

It's pretty straightforward. Set the useFile flag to false in the surefire plug-in. To also skip the xml report output you can set the disableXmlReport to true. Then there will be no reports created when running the tests. Use the profile below to enable this in your pom.

Please note that for some odd reason my syntax highlighter lower case all tags. It should be groupId, artifactId, disableXmlReport and useFile in camel case.

To activate this profile you need to add -Pdev. You could have it active by default but then your CI server will not have any test reports. And whilst no reports are fine on the developer machine it's not very practical on the CI server.

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.