[TIMOB-3180] Android: JAVA_HOME not recognized when launching some Android applications
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-12-19T18:27:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 23, 2013 Sprint 23 Core, 2013 Sprint 26, 2013 Sprint 26 Core, Release 3.2.0 |
Components | Android, Tooling |
Labels | androidbuild, cb-verified, core |
Reporter | Jonathan Knapp |
Assignee | Chris Barber |
Created | 2011-04-15T03:38:57.000+0000 |
Updated | 2013-12-19T19:04:11.000+0000 |
Description
Googled and found that spaces in the Java paths would create complications: http://developer.appcelerator.com/question/34701/error-jdk-version-javac-is-not-recognized-as-an-internal-or-external-command-testing-on-android
We moved the JDK location to C:\Java\java-jdk-folder and it appeared to work fine after updating JAVA_HOME and the Path environment variables to the new location.
This problem appeared when compiling the app from within Titanium, so I'm guessing it doesn't play nice with path names with spaces in them.
Pull request: https://github.com/appcelerator/titanium_mobile/pull/4930
To test, try setting JAVA_HOME to nothing, a path that is not the Java JDK home dir, and a path that is the Java JDK home dir. For each JAVA_HOME value, do a Android device build which will encrypt the JS and trigger "titanium_prep".
Reopening based on conversation with [~cbarber]. JAVA_HOME if set in incorrect location will throw an error. JAVA_HOME if set in correct location will build successfully. JAVA_HOME if not set at all will throw an error.
node-appc master pull request: https://github.com/appcelerator/node-appc/pull/77 node-appc 3.2.x pull request: https://github.com/appcelerator/node-appc/pull/79
Uninstalled CLI 3.2.0-cr3 & reinstalled it but still can see the issue. I think it does not have the new changes in node-appc which fixes this issue. Reopening. Environment: Appcel Studio : 3.2.0.201312181652 Ti SDK : 3.2.0.v20131218153242 Mac OSX : 10.8.5 Alloy : 1.3.0-cr2 CLI - 3.2.0-cr3
@Lokesh, you have to install the Titanium CLI from git:
Pulled CLI from
& could not reproduce the issue. tested by setting: JAVA_HOME to invalid path JAVA_HOME to none In both cases the jdk was successfully detected. Closing. Environment: Ti sdk : 3.2.0.v20131218153242 Appc studio : 3.2.0.201312181652 CLI : from sudo npm install -g git://github.com/appcelerator/titanium.git#3_2_X