Ubuntu 10.10 32-bit and Appcelerator – a how to – Part four

Part Four – Installing the Android SDKs and Appcelerator’s Titanium Mobile Developer

Hello and welcome back for part 4 (hopefully the last part!) of how to setup Appcelerator Titanium Mobile Developer on Ubuntu 1010 32-bit. These steps should also work with Titanium Desktop Developer, although you would have to downlaod that instead of the Mobile version, and probably would not want to add the Android SDK. In this final part we will add the Android SDK’s and finally install Titanium, in the previous parts we have configured a clean Ubuntu 10.10 installation so that all dependencies for Android development are installed and ready to go before we start coding. I got destracted and have started another post about getting The Elder Scrolls Arena and Daggerfall working on Android the last couple of days (should have a post on that a day or two after this one is up). And, off we go, lets get this post finished!

  1. sudo mount -a – make sure our shared drives are properly mounted
  2. let’s download the Android SDK and AVD Manager! – http://developer.android.com/sdk/index.html – The currently available download is android-sdk_r10-linux_x86.tgz, if you are using the default firefox that installs with Ubuntu 10.10 it will save it under ~/Downloads if you want to save a step, don’t save it, just open it with the archive manager and extract the contents to ~/Downloads.
  3. back to our friend the terminal sudo mv ~/Downloads/android-sdk-linux_x86/ /opt/android-sdk/ this will allow you to move the SDK plus AVD manager to the /opt directory, remember to use the [tab] key!
  4. cd /opt/android-sdk-linux_x86/tools/ && sudo ./android – this will move us into the directory and launch the AVD manager
  5. select Available Packages from the left column
  6. click the arrow next to Android Repository, this will expand the currently available choices
  7. I will be starting with 2.1; however I will also add 1.6, 2.2, 2.3.3, and 3.0 SDKs at this time, (you need 1.6 because Titanium looks for it by default and won’t let you set your preferences without it) also I am getting all of the samples, as there is no reason to reinvent the wheel, just the method used to turn it!. I also went under third party and grabbed the google api’s for 1.6, 2.1, 2.2, 2.3, 2.3.3, and 3.0 for the same reason, while under the third-party section, make sure to get the two google market Apis at the bottom. I also retrieved the Api 11 documentation (Android 3.0) (if you are interested there is also a samsung galaxy SDK there, but it is only for Android 2.2r1 for some reason)
  8. click on install selected and a new screen pops up
  9. click the “Accept All” radio button and hit install, this might take a bit… mine downloaded at 2.0 – 2.5mb/s so it was under 5 mins to d/l all of it
  10. You will be prompted to restart ADB, you must do so to continue. then close the application window.
  11. vi ~/.profile – edits your start up preferences
    1. [ctrl+f] [ctrl+f] – moves you down two pages, or in this case to the last line of the file
    2. A – starts editing the line from the end
    3. :/opt/android-sdk:/opt/android-sdk/tools:/opt/android-sdk/platform-tools – adds the android SDK directories to your path
    4. [esc] – ends editing and returns you to command mode
    5. :wq! – saves, then quits the vi editor
  12. sudo ln -s /opt/android-sdk/platform-tools/adb /opt/android-sdk/tools/adb – also needed for titanium, until they update to reflect the new home for adb!
  13. cd ~/android/environment/system && sudo wget http://www.appcelerator.com/download-linux32
  14. go to the Places pulldown menu in Ubuntu –> home folder
  15. then when it is open go to android –> environment –> system
  16. right click on the file download-linux32 and selct extract here – when I tested this, the extraction failed, when I went to the website and followed the prompts to get to the download, it downloaded the same file from the same server path and it was the same size, but the extraction worked. just an fyi if you have issues with these steps
  17. cd Titanium\ Developer-1.2.2 && sudo ./Titanium\ Developer – again remember to use the [tab] key after typing the first couple of letters
    1. on the installer screen, click on the “Install to my home directory” and change it to “Install to /opt/titanium”
    2. click Install
    3. after this ends you should get dumped to the terminal window with an error, so now we will fix that error
      1. cd /opt/titanium/runtime/linux/1.0.0 && sudo mkdir backup && mv libg*-2.0.* ./backup/
  18. cd ~/android/environment/system/Titanium\ Developer && sudo ./Titanium\ Developer – use that [tab] key!
  19. after you log in, or sign up, you should get prompted for an update to 1.6 (no idea why it downloads 1.2.2 instead of 1.6 to begin with, but hey, what can you do?), go ahead and get it, remember to install it to /opt/titanium
  20. after which you will be prompted for an update to 1.1.0 for the desktop developer, grab it if you intend to write anything for windows or linux, else, ignore it.
  21. now restart to make sure all settings changes have taken, remember to skip mounting the two bind mounts on startup
  22. sudo mount -a
  23. cd ~/android/environment/system/Titanium\ Developer-1.2.2/
  24. sudo ./Titanium\ Developer

Congratulations, you are now setup to work projects! I recommend leaving the snapshots for a bit, just in case you have issues. And of course, TAKE A NEW SNAPSHOT NOW!!! the last thing you want to do is screw something up at this point and have to go back… Also, since we have our dev env setup on a share from your local system, you can revert to this point at any time and still be able to pick right back up (I have not tested this yet!!).

I want to thank anyone who takes the time to read this, especially if you leave me comments, or tell me where I screwed up! It would be nice if someone comments about the app they create using this setup even!

  1. part one
  2. part two
  3. part three

About

2 thoughts on “Ubuntu 10.10 32-bit and Appcelerator – a how to – Part four

Leave a Reply

4 visitors online now
1 guests, 3 bots, 0 members
Max visitors today: 6 at 06:01 pm UTC
This month: 7 at 12-01-2020 01:40 am UTC
This year: 138 at 11-21-2020 09:11 pm UTC
All time: 1100 at 08-08-2011 08:11 pm UTC