Android SDK on Ubuntu 11.10

I’ve made several false starts on this. So, I’ve decided to document my process so maybe I’ll help out some other unfortunate souls.

Word on the street is that Sun’s Java is the one to install. Those packages are no longer available in Ubuntu default repos anymore, so we’ll have to install by adding another package repository.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install ant sun-java6-jdk sun-java6-jre sun-java6-bin sun-java6-plugin

The Android SDK is currently shipped just as a 32 bit package. If you have a 64bit OS, you should consider doing the following

sudo apt-get install ia32-libs

Now you’re ready to install the Android SDK, which is available through this link.

tar xfz android-sdk_r16_linux.tgz
cd android-sdk-linux/tools
./android update sdk --no-ui

At this point you should have adb in ‘android-sdk-linux/platform-tools‘. This is pretty much everything you need to compile unless you want to use Eclipse. If you are just learning how to use the SDK, you should continue on to Android’s Dev Guide or perform the ‘Hello World’ Tutorial.

Mac OSX 10.5 SDK in Lion

With the release of Lion (OSX 10.7), they’ve stopped shipping the 10.5 SDK in X code. That’s a problem for me and the users of Ames Stereo Pipeline (ASP) since ISIS currently only builds against 10.5. If you are interested in building ASP on your new mac laptop, you’ll need to follow the instructions bellow to setup a development environment that is compatible with OSX 10.5.

You need the following:

  • Laptop with no install of XCode currently
  • The install dmg for XCode 4 or equivalent from the AppStore.
  • The install dmg for XCode 3.2.6

The older XCode version is available at ‘Downloads for Apple Developers’. Sadly you’ll need a registered Apple ID. Darn them!

Step 1
Install XCode 4 normally.

Step 2
Mount but don’t run the XCode 3.2.6. Inside that new volume you’ll find a hidden ‘Packages’ folder that contains MacOSX10.5.pkg. Run that and it will install the missing SDK to /Developer/SDKs/. 

> open xcode_3.2.6_and_ios_sdk_4.3.dmg
> cd /Volumes/Xcode\ and\ iOS\ SDK/Packages
> open MacOSX10.5.pkg

You might want to double check that the 10.5 SDK is installing into the /Developer folder and not just root.

Step 3
This old SDK is missing some symlinks to be compatible with the new Darwin 11. You’ll need to add them with the following commands. 

> cd /Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.2.1
> sudo ln -s i686-apple-darwin9 i686-apple-darwin11
> sudo ln -s x86_64-apple-darwin9 x86_64-apple-darwin11

You are finished!