{ "id": "140182", "key": "AC-3296", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-11-22T00:01:14.000+0000", "created": "2014-11-21T21:11:47.000+0000", "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-03-08T07:57:43.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14552", "name": "Appcelerator CLI", "description": "Please enter tickets related to Tooling and the CLI here" } ], "description": "h4. Problem\r\nTitanium tooling will not build a project that has more than 65536 total method calls\r\n\r\nCurrently android has a limit on the number of methods permitted (65536)\r\nAs an example, the latest google-play-services.jar from 3.4.1 has 23600.\r\nFor basic S3 support from aws 2.0, a module uses 26800.\r\n\r\nBy the time you build an empty titanium app you are left with:\r\n{code}\r\n[ERROR] trouble writing output: Too many method references: 68927; max is 65536.\r\n{code}\r\n\r\nh4. Solution\r\n\r\nThe solution is to use the --multi-dex option in calling dexer.\r\nThe 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.\r\n\r\nExample \r\n{code}\r\ndexArgs = [\r\n\t\t\t'-Xmx' + this.dxMaxMemory,\r\n\t\t\t'-XX:-UseGCOverheadLimit',\r\n\t\t\t'-Djava.ext.dirs=' + this.androidInfo.sdk.platformTools.path,\r\n\t\t\t'-jar', this.androidInfo.sdk.dx,\r\n\t\t\t'--dex', '--multi-dex',\r\n\t\t\t'--output=' + this.buildBinClassesDex,\r\n\t\t\tthis.buildBinClassesDir,\r\n\t\t\tpath.join(this.platformPath, 'lib', 'titanium-verify.jar')\r\n{code}", "attachment": [], "flagged": false, "summary": "Enable --multi-dex for android builds", "creator": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "sfeather", "key": "sfeather", "displayName": "Stephen Feather", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "333310", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "This ticket was magically created by error. Thanks Jira.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-11-22T00:01:14.000+0000", "updated": "2014-11-22T00:01:14.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }