Problem
Titanium tooling will not build a project that has more than 65536 total method calls
Currently android has a limit on the number of methods permitted (65536)
As an example, the latest google-play-services.jar from 3.4.1 has 23600.
For basic S3 support from aws 2.0, a module uses 26800.
By the time you build an empty titanium app you are left with:
[ERROR] trouble writing output: Too many method references: 68927; max is 65536.
Solution
The solution is to use the --multi-dex option in calling dexer.
The problem will be that --multi-dex cant just be dropped in as it requires a different output. A decision will need to be made on how to modify this.buildBinClassesDex.
Example
dexArgs = [
'-Xmx' + this.dxMaxMemory,
'-XX:-UseGCOverheadLimit',
'-Djava.ext.dirs=' + this.androidInfo.sdk.platformTools.path,
'-jar', this.androidInfo.sdk.dx,
'--dex', '--multi-dex',
'--output=' + this.buildBinClassesDex,
this.buildBinClassesDir,
path.join(this.platformPath, 'lib', 'titanium-verify.jar')
This ticket was magically created by error. Thanks Jira.