Description
Packaging an Android module to any of the three options from within Studio will fail with the following console output
Executing build.xml...
C:\Users\Tester\AppData\Roaming\Titanium\mobilesdk\win32\3.2.1.v20140122175749\module\android\build.xml:326: The following error occurred while executing this line:
C:\Users\Tester\AppData\Roaming\Titanium\mobilesdk\win32\3.2.1.v20140122175749\module\android\build.xml:281: exec returned: 1
I have attached a file containing the output of the studio log.
Steps To Reproduce
1. Create an Android module
2. Package the module to the Titanium SDK
Expected Result
The module should package successfully
Actual Result
The package fails
Here is the output [~mxia]
So look like python is not installed on the system. Sam, could you check if running "python" from command line works? If not, let's try installing Python separately and see if it helps.
[~mxia], Python 3.3.3 is installed and set up in the system environment variables. Running the command "python" in the command line detects the python environment as well. Studio still fails while packaging.
I don't think we support that version of Python, do we? At one point, we only supported 2.7.
[~ingo], to test your assumption I removed Python 3.3.3 and installed Python 2.7.6. I still ran into the same error. Command line detects version 2.7.6 just as it did 3.3.3 and still Studio fails while packaging.
After a couple hours I finally got everything installed and working. For starters, if you create the module from Studio, you need to download and install the Eclipse Java Development plugin. I suppose you can skip this if you invoke titanium.py directly from the command line, which brings us to the next dependency... You must install Python 2.7. Python 3.3 will NOT work. I tested with v2.7.6 (32-bit). You need to put Python directory in the PATH. Of course you need Apache Ant, so download and install that, then add the Ant directory to the PATH. Next you need to install the Android NDK. I chose r9c (64-bit). After unzipping (1.1GB!), you need to set the ANDROID_NDK environment variable to point to the folder. Be sure you install this in a directory that does NOT contain any spaces. Just when you think you're almost done, you need to download the Android 2.3.3 SDK. This is required by the (old) build scripts. Ready to build? Not so fast. You need to go download and install gperf (http://gnuwin32.sourceforge.net/packages/gperf.htm). Add that to the PATH. Oh, then restart Windows for whatever reason. Finally create a module project. Remember to put it a directory that doesn't have any spaces. I have no clue how to build a module from Studio, so let's open a command prompt. Change to the module project directory and run "ant".
Applause! FWIW, I have been trying to get rid of gperf for over a year now: TIMOB-10724. I wonder how much better it would be if we just did that and get rid of the Android 2.3.3 requirement.
gperf is interesting. I'm not sure how it's being used, but it doesn't seem like something we can just rip out. Maybe if we rewrote the module build scripts in Node.js, then we could find something cross-platform that will work, which subsequently also removes Python from the equation. The Android 2.3.3 requirement has got to go.
Closing ticket as the issue cannot be reproduced and due to the above comments.