So, I’ve started with a clean OS install in a virtual box VM (see screen shot) and here is where I’ve gone from there (currently not working, waiting on some advice from the Titanium Developers forums)…

Titanium Kubuntu 10.04 Virtual Machine Settings
Before we get started I want to make sure you know that there are a lot of steps below and that not all of them are necessary, again this is just how I did it.
*********update 5-17-2010**********
(on doing this again on a new from scratch system I have learned that in the Java section, steps 10-31 may not be necessary at all. while this is a good thing to have setup on your system for future upgrades, it is not necessary UNLESS you have the open source java installed prior to installing java (or anytime after installing java. this is actually out of order in these steps, you would have to do steps 1-7 in the following section (installing gcj-4.4-base) BEFORE doing the Java section, else steps 10-31 will not work.)
First let’s finish setting up the Ubuntu installation and get out guest additions installed. (although I use KDE, all of this should work from gnome, or ice, or xfce, or whatever GUI window manager you have chosen.
- sudo apt-get update
- sudo apt-get install dpkg dpkg-devel
- sudo apt-get dselect-upgrade
- sudo apt-get install yakuake
- reboot
- sudo apt-get autoremove
- select “devices” from the VM window
- select “install Guest Additions”
- when the “devices recently plugged in” window appears, click on the VBox guest additions, and select browse with Dolphin. this will mount the CD in /media for you
- cd /media/VB[press the tab here for auto-completion, as the name changes for every version of VirtualBox]
- sudo ./VBoxLinuxAdditions-x86.run
- wait for it to finish, then reboot your system (simplest way, not only method)
Now you should be able to resize your screen by just resizing the VBox window, and your mouse should move between host and guest without exclusivity, you also should get better performance if your host is outdated or low end.
Let’s install java SE JDK!
- cd ~/Downloads
- mkdir android
- mkdir android/environment
- mkdir android/environment/system
- http://java.sun.com/javase/downloads/widget/jdk6.jsp (this is where you need to go to get the current Java SE JDK, I tried to find a direct url useable by wget, but they have it scripted so you need to use the web browser, save this file in /opt/java)
- cd /opt/java
- sudo chmod +x jdk*
- sudo ./jdk-6u20-linux-i586.bin (may need to change the name depending on the the version you downloaded, this will install/extract java into the /opt/java directory)
- sudo rm jdk-6u20-linux-i586.bin (since this is a vm, it is a good idea to clean up after yourself! the final virtual hdd is gonna be pretty big anyway)
- sudo ln -s /opt/java/jdk1.5.0_09 /usr/lib/jvm/java-sun
- sudo vi /etc/jvm (this file did not exist for me, do not know why you need to do this or if you can skip this step)
- “O“
- “/usr/lib/jvm/java-sun” (make sure to include the quotes, again I do not know why, but the Ubuntu Forum post I found said to do it this way)
- sudo cp /usr/lib/jvm/.java-gcj-jinfo /usr/lib/jvm/.java-sun-jinfo (this file does not exist on my system, if you have it do steps 14 – 17, if not skip them, as he did not give the details of the expected file contents)
- sudo vi /usr/lib/jvm/.java-sun.jinfo
- [esc] :%s/java-gcj/java-sun/g (make sure to get the colon as the first character if you are copy and pasting!! this line replaces all the gcj’s with sun, gcj is the GNU open source version of java, what we are doing here is replacing the references to it with references to the newly installed sun java so your system will use sun java instead of the GNU java)
- [esc] :wq!
- sudo apt-get install galternatives
- sudo ln -s /usr/lib/jvm/java-sun/ /etc/alternatives/java-sun
- galternatives (this will run the GUI version of alternatives so you can make edits on the files without using vi)
- select each of the following one by one and repeat steps 22 – 24 for each one. jar, jarsigner, java, javac, javadoc, javah, native2ascii, rmic, rmid, rmiregistry, serialver
- click ‘add’
- set path to /etc/alternatives/java-sun/bin/[name of what you are changing, ie jar, java, javah, javap...]
- set the priority to the “gcj priority”+1 (note it will not allow you to input numbers greater than 1000 in the GUI, those must be done manually, so just set them to 1000 at this time. it is recommended not to set them to manual, so see step 34 after completing all of these additions for how to make these the defaults.)
- sudo update-alternatives –force –install /etc/alternatives/javap javap /usr/lib/jvm/java-sun/bin/javap 1066 (javap did not exist for me so I had to enter this at the command line, it returned multiple errors; however when I reran galternatives, the new setting was there.)
- cd /var/lib/dpkg/alternatives
- sudo vi java (repeat this process, steps 27 – 29, for all the changes above that you were not able to set the priority over 1000 on)
- [esc] :%s/1044/944/ (replace the “1044″ with the number that your system has, this may be different for each file. for simplicity, set the “944″ to the number your system has – 100)
- [esc] :wq! (note, this is not necessarily the fastest nor most efficient way of using vi, nor is it the way I usually do it; however I use this method when I write this information out, because it will work regardless of the contents in your file that are/were not in mine AND because without actually seeing the file I cannot tell you “go to line # 5′ or ‘change the third word of the eighth line to “blah”‘. this method should prevent you from inadvertently changing something you should not, I hope…)
- java -version (this should display the version you just downloaded and installed, if not… go over the steps again and make sure you followed them all, else… well back to searching the inet for a solution, for you!
- javac -version (just in case check this one too!)
Right now that that is done, let’s move on to installing the dependencies for your development environment (again, may not be the only method, nor even the recommended one, but this is what I have done!)
- cd ~/Downloads/android/environment/system (this will keep your home folder from filling with source code and build files)
- sudo apt-get install debhelper gcj-4.4-base gcj-jdk m4 debiandoc-sgml python-docutils cdbs (these are the dependencies for step 3 and need to be installed first)
- sudo apt-get -b source gcc-defaults gcc++ python-defaults ruby-defaults
- sudo apt-get update
- sudo apt-get dselect-upgrade (check for any updates to the files you have just installed, always a good thing!)
- sudo apt-get autoremove (this removed 85.2MB for me)
- at this point I did a complete shutdown and created a snapshot in VirtualBox. current Virtual HDD file was 4.72GB before I took the snapshot. (in case I messed something up in the next part, as we have accomplished a good bit of work at this stage)
Now that all of your prerequisites have been installed, let’s install our development environment! (finally)
- go to http://developer.android.com/sdk/adding-components.html and download the android SDK to /opt
- using dolphin (or your favorite GUI folder browser) find this file and right click on it, select extract here
- cd android-sdk-linux_x86/tools
- sudo ./android
- goto settings first and check the box for “force https://”
- select available packages click the down arrow to the left of the web address shown.
- check the boxes for: SDK 1.6 API 4 R2 / SDK 2.1 API 7 R1 / Google API 1.6 / Google API 2.1 (this will let you code for Android 1.6 (more of these currently than any other OS version) and 2.1 devices (the newest available) and the google API’s will let you access the preinstalled google apps that come with android and their resources (google maps and voice command and such) I also recommend the samples and documentation files if you are new to coding for Android.
- click “install selected”
- click “accept all”
- click “install” (at this point it will begin installing, you can wait, or continue on to my next step while it does this, personally I let it run, and went to get something to eat!! make sure you check the details before closing, my 1.6 environment did not install with the error: finished with wrong size, expected 63422901 bytes received 4828132 bytes, this also caused the google APIs for 1.6 to fail and I had to re-attempt to install 1.6, everything worked the second time)
- cd ~
- vi .bashrc
- press the following “jjjO” (this will move you down 3 lines, insert a new line and allow you to start editing, then just copy and past the following 2 lines)
- export JAVA_HOME=/usr/lib/jvm/java-sun
- export PATH=$PATH:$JAVA_HOME:/opt/android-sdk/
- [esc] “wq!“
- cd ~/Downloads/android/environment/system
- sudo wget http://www.appcelerator.com/download-linux32 (this should get you the “Titanium Developer.tgz” file)
- use dolphin again to right click and “extract here”
- now you should have a “Titanium Developer-1.2.1″ directory
- cd /opt/titanium/runtime/linux/1.0.0 (need to fix some incompatibilities that I found on the Titanium Developers forum)
- sudo mkdir backup
- sudo mv libgobject-2.0.* backup/
- sudo mv libglib-2.0.* backup/
- sudo mv libgio-2.0.* backup/
- sudo mv libgthread-2.0.* backup/
- cd ~/Downloads/android/environment/system/Titanium\ Developer-1.2.1/
- ./Titanium\ Developer (I have tried both with and without sudo, but it throws an error instead of running. I have posted a question on the Titanium Developers forum and linked it to here, so hopefully someone can help me out.)
Now that 32-bit is working, I’ll give the x64 version another shot this weekend. Hope I did not upset too many people over at the forums with my first post! but neither google nor bing came up with that forum post while I was searching…
Sorry for the exceptionally long title…
************************FAILED INSTALLATION, after approximately 3 hours of trying I give up**********************
**********update********
going to give it a shot on a 32-bit install tonight and see how that goes…
********end update********
Had a bit of an issue getting this to work, so I decided to [...]
Sorry for the exceptionally long title…
************************FAILED INSTALLATION, after approximately 3 hours of trying I give up**********************
**********update********
going to give it a shot on a 32-bit install tonight and see how that goes…
********end update********
Had a bit of an issue getting this to work, so I decided to put up a post, seeing as how some of the new fandangled Android phones launching this year will get some people interested in developing their own apps (and apple products too, this SDE is good for iPhone and Android currently…) For this example, I am doing it as I type it, so hopefully I will come back and clean it up a bit later… I am creating a directory under ~/Downloads to both DL and save all the files used in this process.
*********************I had an error in this process, so I have documented it here. make sure you read through to the end before trying, as I will re-post a working step-by-step guide at the end so you can avoid these errors…******************
step by step how I got this working (hopefully it will be working when I finish!!)
- mkdir ~/Downloads/android/environment (makes the app directory, you can put it where ever you want, it will make a subdirectory when you do the download)
- sudo apt-get install build-essential ruby rubygems libzip-ruby scons libxml2-dev libgtk2.0-dev python-dev ruby-dev libdbus-glib-1-dev libnotify-dev libgstreamer0.10-dev libxss-dev libcurl4-openssl-dev git-core (this downloads all the dependencies you need)
- git clone git://github.com/appcelerator/titanium_desktop (this actually pulls down the application)
- cd titanium_desktop
- git submodule update –init (initiates an update I believe…)
- cd kroll
- git checkout master (really know nothing about git, I’ll have to look this one up…)
- cd ..
- scons debug=1 sdkinstaller run=1 (this actually builds the app and makes a binary for you to run)
after step 9 I got this error
/usr/bin/ld: cannot find -lPocoFoundation
collect2: ld returned 1 exit status
scons: *** [build/linux/runtime/libkhost.so] Error 1
scons: building terminated because of errors.
a little hunting found me this:
sudo apt-get install libPocoFoundation*
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting libpocofoundation9-dbg for regex ‘libPocoFoundation*’
Note, selecting libpocofoundation9 for regex ‘libPocoFoundation*’
The following extra packages will be installed:
libpocofoundation9 libpocofoundation9-dbg
The following NEW packages will be installed:
libpocofoundation9 libpocofoundation9-dbg
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,924kB of archives.
After this operation, 10.6MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/universe libpocofoundation9 1.3.6p1-1 [525kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/universe libpocofoundation9-dbg 1.3.6p1-1 [2,399kB]
after which it proceeded to install those 2 packages…
so I re-ran the install script to see what it might do…
same error… new tactic…
sudo ln -s /usr/lib/libPocoFoundation.so.9 /usr/lib/libPocoFoundation
ran it again…
same error… new tactic…
ls ./build/linux/runtime/
libcrypto.so.0.9.8 libgpg-error.so.0.3.0 libPocoCrypto.so.9 libproxy.so.0.0.0
libcurl.so.4.1.1 libgthread-2.0.so.0.2200.3 libPocoData.so.9 libsoup-2.4.so.1.3.0
libgailutil.so.18.0.1 libicudata.so.38.1 libPocoFoundation.so.9 libsoup-gnome-2.4.so.1.3.0
libgcrypt.so.11.4.4 libicui18n.so.38.1 libPocoNet.so.9 libssl.so.0.9.8
libgeoclue.so.0.0.0 libicuio.so.38.1 libPocoNetSSL.so.9 libwebkittitanium-1.0.so.2.15.1
libgio-2.0.so.0.2200.3 libicule.so.38.1 libPocoSQLite.so.9 libxcb-render.so.0.0.0
libglib-2.0.so.0.2200.3 libiculx.so.38.1 libPocoUtil.so.9 libxcb-render-util.so.0.0.0
libgnutls.so.26.4.6 libicutu.so.38.1 libPocoXML.so.9 webinspector
libgobject-2.0.so.0.2200.3 libicuuc.so.38.1 libPocoZip.so.9
- sudo vi /etc/environment
- /PATH
- $
- i
- :/home/android-sdk/.titanium/runtime/linux/1.0.0/
- [esc]
- :wq!
:~/Downloads/android/environment/titanium_desktop/installer/linux$ cat SConscript#!/usr/bin/env pythonimport os.path as path
To get updates…
- cd ~/Downloads/android/environment/titanium_desktop
- git pull
- cd krull
- git pull
**********reference link for this information, I just made it more specific and actually tried to do it using these instructions…
and the following other useful blog posts and such…
http://ubuntuforums.org/showthread.php?t=932162
http://www.linuxquestions.org/questions/linux-software-2/make-error-usr-bin-ld-cannot-find-lxext-365646/
http://ubuntuforums.org/showthread.php?t=204908
don’t forget to get the Android SDK!!!
Twitter: finndo77
- New blog post... Diablo III closed Beta http://t.co/dKC2ChWm 01:36:32 PM December 07, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... resolving video problems with K-L-Ubuntu and XFX Radeon 6850 http://t.co/H6bXuMqi 06:59:18 AM October 22, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... Computer upgrades http://t.co/6PWVNy4m 01:39:35 PM October 20, 2011 from joelperryproductions.com ReplyRetweetFavorite
- $7 for $15 Worth of Hand-Tossed Pizza, Calzones, and Drinks at Andolini's Pizza Charleston, SC http://t.co/QnKwPwB 11:49:26 AM August 29, 2011 from Tweet Button ReplyRetweetFavorite
- New blog post... is zdnet.com/news down http://t.co/DThuI4r 07:57:28 AM August 17, 2011 from joelperryproductions.com ReplyRetweetFavorite
- New blog post... Netflix Down? http://bit.ly/q74Svu 07:39:30 PM August 08, 2011 from joelperryproductions.com ReplyRetweetFavorite
Blogroll
programming
Tech Websites
- a good coder I found on CodeProject
- Barebones HTML coding chart
- Code Project
- Extreme Overclocking
- FreeBSD blog
- Legit Reviews – Tech Hardware Review
- Linuxtopia
- Notion Ink – homepage
- Plug Computing web site and forums
- Tablet Roms – used to be – Notion Ink Hacks
- Ubuntu Forums post on the mount command and fstab file
- VMWare ESX blogger
- Wikipedia.org main page
- ZDNet's blog pages

