Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20117] scons not sees env variables

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2016-07-29T14:10:22.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
Labelsbuild, scons, sdk
ReporterAndrey Tkachenko
AssigneeChris Barber
Created2015-11-21T19:58:26.000+0000
Updated2017-03-22T17:48:03.000+0000

Description

Steps to success build:
$ cd ~/Documents/work/titanium/titanium_mobile/
$ scons
scons: Reading SConscript files ...
Installing npm packages...
npm WARN package.json doctools@0.0.0 license should be a valid SPDX license expression
Building MobileSDK version 5.2.0, githash 94c017f
Exception: No Android SDK directory found:
  File "/Users/falko/Documents/work/titanium/titanium_mobile/SConstruct", line 119:
    sdk = AndroidSDK(ARGUMENTS.get("android_sdk", None), 23)
  File "/Users/falko/Documents/work/titanium/titanium_mobile/support/android/androidsdk.py", line 48:
    raise Exception('No Android SDK directory found')
$ echo $ANDROID_HOME
/Users/falko/Library/android-sdk-macosx/
$ scons android_sdk=$ANDROID_HOME
scons: Reading SConscript files ...
Installing npm packages...
npm WARN package.json doctools@0.0.0 license should be a valid SPDX license expression
Building MobileSDK version 5.2.0, githash 94c017f
java -cp /Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/ant.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/ant-launcher.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/xercesImpl.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/xml-apis.jar:/Users/falko/Documents/work/titanium/titanium_mobile/android/build/lib/ant-nodeps.jar org.apache.tools.ant.launch.Launcher -Dant.home=build -Dkroll.v8.build.x86=1 -Dandroid.sdk=/Users/falko/Library/android-sdk-macosx/ -Dandroid.platform=/Users/falko/Library/android-sdk-macosx/platforms/android-23 -Dndk.build.args=JAVAH=javah -Dbuild.githash=94c017f -Dgoogle.apis=/Users/falko/Library/android-sdk-macosx/add-ons/addon-google_apis-google-23 -Dbuild.version=5.2.0 -buildfile build.xml full.build
Buildfile: /Users/falko/Documents/work/titanium/titanium_mobile/android/build.xml

clean.all:
    [mkdir] Created dir: /Users/falko/Documents/work/titanium/titanium_mobile/dist/android/classes/ant-tasks
    [javac] Compiling 8 source files to /Users/falko/Documents/work/titanium/titanium_mobile/dist/android/classes/ant-tasks

BUILD FAILED
/Users/falko/Documents/work/titanium/titanium_mobile/android/build/common.xml:618: The following error occurred while executing this line:
/Users/falko/Documents/work/titanium/titanium_mobile/android/build/common.xml:651: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre"

Total time: 0 seconds
$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
$ JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/ scons android_sdk=$ANDROID_HOME
*Success!*

Comments

  1. Issei Komatsu 2016-07-29

    FYI: http://www.smorgasbork.com/2015/05/15/compiling-titanium-mobile-sdk-from-scratch/
  2. Chris Barber 2016-07-29

    We have removed scons and replaced it with a Node script. View Titanium SDK's readme for how to build.
  3. Lee Morris 2017-03-22

    Closing ticket as the issue will not fix and with reference to the above comments.

JSON Source