Monday, 4 October 2010

Appcelerator Titanium - Installation issues on Ubuntu 10.04 (Lucid Lynx)

The Titanium product promises desktop and mobile development, using HTML, CSS and Javascript, to Windows, Mac, Linux, Android, iPhone and soon Blackberry.

This is an impressive goal, but can it really work?

My first step was to install the product, which unfortunately wasn't as straight forward as I would have liked.  This blog entry is hopefully my first of many, on Titanium, purely to document the steps I took to get it running on Ubuntu.  This blog does not detail the full setup procedure, instead, I show what I had to do to get it working after I had completed their installation instructions (follow link, then select downloads).

When trying to run Titanium I received the error "symbol lookup error: /usr/lib/ undefined symbol: g_malloc_n".  To fix that, I had to type...

cd /home/rob/.titanium/runtime

rm libgobject-2.0*
rm libglib-2.0*
rm libgio-2.0*
rm libgthread-2.0*

It would seem that it didn't like trying to use the Java open JDK, so I typed

sudo aptitude remove openjdk-6-jre icedtea6-plugin

To change from Open JDK to Sun JDK...

sudo aptitude install sun-java6-jre sun-java6-jdk sun-java6-plugin sun-java6-fonts

After all of this, Titanium then reported that it couldn't create a new project, so I changed the use of Android 8 to Android 4 (within the 'android' tool that enables you to specify the API's to install) and then...

gedit ~/.profile

Note that the 'android-4' mentioned in the path was 'android-8' but failed to work...

export PATH

I did have a timeout error launching the Android emulator, when this happened I launched the simulator again and then it worked.

I still receive an error '[ERROR] /home/rob/android-sdk-linux_x86/tools/apkbuilder' which I have yet to resolve, however, it doesn't seem to stop the tool from running!


My attempt of installing on the Mac also failed - I currently can't launch the iPhone simulator, but that's for another blog entry (once I've fixed it!).