Build Titanium mobile from source - Android SDK issues
Following the answer here to build from the GitHub source.
I have my class paths all correct as stated here
Upon running Scons I get an error stating that Android SDK is missing, when it is installed and working (OS X 10.6)
scons: Reading SConscript files ...
Exception: No Android SDK directory found:
File "/Users/jmw/src/titanium_mobile/SConstruct", line 79:
sdk = AndroidSDK(ARGUMENTS.get("android_sdk", None), 4)
File "/Users/jmw/src/titanium_mobile/support/android/androidsdk.py", line 42:
raise Exception('No Android SDK directory found')
My Class paths are:
#Android
export PATH=$HOME/Dev/Android/android-sdk-mac_86/tools:$PATH
export PATH=$HOME/Dev/Android/android-sdk-mac_86/platforms/android-3/tools:$PATH
Where could I be going wrong?
5 Answers
-
I got this working by making a few changes.
Take a look at the diff here: http://github.com/thisduck/titanium_mobile/commit/89e5a00bffa05ce94879e6f0a14dc6e7ac10f222
Make those changes, or clone http://github.com/thisduck/titanium_mobile and then run
scons android_sdk=$ANDROID_HOME
That should build from the sources.
-
Thanks Joel that was spot on!
So make sure you have a symlink from
/opt/android-sdk/
to your android-sdk directory.
All my symlinks were correct I just needed to change the line (as Joel stated above):
<property name="android.platform" value="${android.sdk}/platforms/android-1.6"/>
to
<property name="android.platform" value="${android.sdk}/platforms/android-4"/>
Build successful :-)
-
After re-adding a sym link to my android directory as stated in the docs, I now get so far along with the build.
However build fails with
package com.google.android.maps does not exist
I have checked and installed the Google API's Android API 8, revision 1 as detailed in the Google Android docs as the Maps SDK is not installed by default.
Build still fails. Giving up now…
-
Still not working I have forked the main repository dones the changes as specified by Adnan (thanks for the info) but I'm still getting the same error messages. "No "android-4" or "android-1.6" in the Android SDK:"
I also don't get anything when I type aapt v in to the terminal. Somethings a miss but I can;'t work out what it is?
Really need to build from source. Titanium folks can you add a how to build section into the README file please?
-
Hello,
I have just published a post on my blog concerning building 1.8.0.1 from source on Ubuntu 10.04
http://www.wlaurance.com/2011/12/06/building-titanium-mobile-sdk-1-8-0-1-from-source