1
votes

My problems with Titanium Alloy on Windows 10 won't stop. I have created a new module with ti create and selecting Module and android. I added the path to Android NDK in the build.properties file. When trying to compile the module with Ant, I get the following error log:

Buildfile: C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\build.xml
python.set.exec:
python.check:
     [echo] Testing for Python
     [exec] Python 3.5.2
init:
process.aidl:
     [echo] Generating java files from the .aidl files
     [echo] C:\android-sdk\build-tools\23.0.3\aidl.exe
process.annotations:
    [mkdir] Created dir: C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\build\generated\json
    [javac] Compiling 2 source files to C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\build\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] Note: [KrollBindingGen] Running Kroll binding generator.
    [javac] Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/Ti.NearbyMessages.json
    [javac] Note: [KrollBindingGen] Found binding for proxy Example
    [javac] Note: [KrollBindingGen] Found binding for module TiNearbyMessages
    [javac] C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\src\de\vater\solution\ti\nearbymessages\ExampleProxy.java:15: error: cannot find symbol
    [javac] import org.appcelerator.titanium.util.Log;
    [javac]                                      ^
    [javac]   symbol:   class Log
    [javac]   location: package org.appcelerator.titanium.util
    [javac] C:\Users\ekoppenhagen\workspace_titanium\Ti.NearbyMessages\android\src\de\vater\solution\ti\nearbymessages\ExampleProxy.java:16: error: cannot find symbol
    [javac] import org.appcelerator.titanium.util.TiConfig;
    [javac]                                      ^
    [javac]   symbol:   class TiConfig
    [javac]   location: package org.appcelerator.titanium.util
    [javac] Note: [KrollBindingGen] Generating JSON: file:/C:/Users/ekoppenhagen/workspace_titanium/Ti.NearbyMessages/android/build/generated/json/org/appcelerator/titanium/bindings/Ti.NearbyMessages.json
    [javac] warning: The following options were not recognized by any processor: '[kroll.checkTiContext]'
    [javac] 2 errors

BUILD FAILED
C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20160816022751\module\android\build.xml:185: Compile failed; see the compiler error output for details.

Total time: 1 second

Additionally to the normal setup (see my other problem), I have installed Android NDK (v12.1.2977051), Ant (v1.9.7), Gperf (v3.0.1), Python 32 bit (v3.5.2), Python Setup Tools (v25.2.0) and all required easy_install packages listed on the Appcelerator Docu.

While installing these components, I met two several other problems:

  1. The installation of the additional packages failed for various reasons. I had to install the Visual C++ Build Tools from here.
  2. Some files in the Ti SDK folder could not be found. I had to copy the content of C:\ProgramData\Titanium\mobilesdk\win32\<SDK version>\module\android\win32 to its parent's folder.

I modified my environment variables as follows:
PATH:
C:\Program Files (x86)\apache-ant-1.9.7\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Python35-32;C:\Python35-32\Scripts
ANDROID_NDK:
C:\android-sdk\ndk-bundle

(I also tested it for Python v2.x 32 Bit with the same results.)

My first try to compile the build.xml located in my project's android folder failed with the following message:

    BUILD FAILED
    C:\ProgramData\Titanium\mobilesdk\win32\<SDK version>\module\android\build.xml:165: no executable specified  

Luckily, Dan Kronholm provided the solution here. But now I get the error mentioned at the beginning. I tried booth Eclipse 32 bit and the command line.

Thank you for your help!

TLDNR: my Ant build fails for my Titanium Alloy Android Module

1

1 Answers

0
votes

Besides problems with Windows 10, it looks like the used Titanium SDK has some missing files in the \ProgramData\Titanium\mobilesdk\win32\<SDK Version>\android\titanium.jar. The files Log.class and TiConfig.class were some of them.

To "update" the titanium.jar, I used an older SDK and extracted its titanium.jar. Then, the missing files can be added via Command Line (look here for details).

Nonetheless, new errors appear... I think this forces me to switch to a MAC.