{ "id": "132286", "key": "TIMOB-17221", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-06-27T21:22:59.000+0000", "created": "2014-06-26T17:59:08.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "module_cli", "qe-3.3.0", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "52822", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "133255", "key": "TIMOB-17339", "fields": { "summary": "Android: 3.2.3.GA SDK breaks build process as it can't find tool: zipalign", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-09-28T21:42:27.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "H5.Description:\r\n1. Update the Android SDK tools to rev23\r\n2. Create an classic/alloy app.\r\n3. Build it for android device/emulator.\r\n\r\nh5.Actual Result:\r\n1. At the beginning of the logs we get error logs as it can't find the zipalign tool:\r\n{code}\r\n[ERROR] : Unable to find Android SDK tools: zipalign.\r\n[ERROR] : You have an incomplete or out-of-date installation.\r\n[ERROR] : Verify your Android SDK packages or reinstall the Android SDK by running 'titanium setup android' or manually downloading from http://appcelerator.com/android-sdk.\r\n{code}\r\n2. The build process continues & fails giving following errors later:\r\n{code}\r\n[INFO] : Aligning zip file: null \"-v\" \"4\" \"/Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/testapp/build/android/bin/testapp.apk\" \"/Users/lokeshchoudhary/Desktop/workspaces/comerica_workspcae/testapp/build/android/bin/testapp.apkz\"\r\n/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185\r\n throw e;\r\n ^\r\nTypeError: Bad argument\r\n at ChildProcess.spawn (child_process.js:915:24)\r\n at exports.spawn (child_process.js:715:9)\r\n at Object.run (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140625133319/node_modules/node-appc/lib/subprocess.js:47:14)\r\n at AndroidBuilder. (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140625133319/android/cli/commands/_build.js:4126:20)\r\n at /usr/local/lib/node_modules/titanium/lib/hook.js:256:13\r\n at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:232:13\r\n at async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:130:20)\r\n at _asyncMap (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:226:9)\r\n at Object.mapSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:216:23)\r\n at async.series (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:549:19)\r\n---------------------------------------------\r\n at Object.run (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140625133319/node_modules/node-appc/lib/subprocess.js:59:8)\r\n at AndroidBuilder. (/Users/lokeshchoudhary/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.v20140625133319/android/cli/commands/_build.js:4103:20)\r\n at /usr/local/lib/node_modules/titanium/lib/hook.js:256:13\r\n at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:232:13\r\n at async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:130:20)\r\n at _asyncMap (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:226:9)\r\n at Object.mapSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:216:23)\r\n at async.series (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:549:19)\r\n[ERROR] Application Installer abnormal process termination. Process exit value was 8\r\n{code}\r\n\r\nh5.Expected Result:\r\n1. We should not get any errors & the app should build successfully. ", "attachment": [], "flagged": false, "summary": "Android: Android SDK tools update to rev23 breaks build as it can't find tool zipalign", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Environment:\r\nAppc Studio : 3.3.0.201406231625\r\nTi SDK : 3.3.0.v20140625133319\r\nMac OSX : 10.8.5\r\nAlloy : 1.4.0-rc2\r\nCLI - 3.3.0-rc3\r\nCode Processor: 1.1.1\r\nNexus 5 - android 4.4.4\r\nAndroid SDK tool's – 22.6.4\r\nAndroid Platform Tools – 20\r\nAndroid Build tools – 20", "closedSprints": [ { "id": 135, "state": "closed", "name": "2014 Sprint 13 Tooling", "startDate": "2014-06-23T23:44:04.894Z", "endDate": "2014-07-04T00:00:00.000Z", "completeDate": "2014-07-07T16:26:26.229Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "311126", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Workarounds which can be used in this case & works:\r\n\r\nThere are 2 workarounds:\r\nh6.1. Create \"android.executables.zipalign\" flag in ti.config:\r\nCreate a \"android.executables.zipalign\" ti.config flag in CLI & set it to the path for zipalign. \r\nThe new path for the zipalign tools is \"android-sdk-folder/build-tools/19.1.0/zipalign\". \r\nMake sure you include tool name zipalign in the path.\r\n\r\nh6. 2. Copy zipalign from \"build tools/19.0.1\" to \"tools\" folder:\r\nCopy & paste the zipalign tool from \"android-sdk-folder/build-tools/19.1.0\" to \"tools\" folder.\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-26T18:33:31.000+0000", "updated": "2014-06-26T18:33:31.000+0000" }, { "id": "311140", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Titanium SDK master pull request: https://github.com/appcelerator/titanium_mobile/pull/5856\r\nTitanium SDK 3_3_X pull request: https://github.com/appcelerator/titanium_mobile/pull/5857\r\n\r\nTitanium CLI master pull request: https://github.com/appcelerator/titanium/pull/146\r\nTitanium CLI 3_3_X pull request: https://github.com/appcelerator/titanium/pull/147\r\n\r\nTo test:\r\n1) update to latest Android build/sdk/platform tools\r\n2) run \"ti info -t android -o json\" and verify it found zipalign\r\n3) run \"ti setup check\" to make sure the Android tools are good to go\r\n4) build any android app", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-06-26T19:01:18.000+0000", "updated": "2014-06-27T20:29:56.000+0000" }, { "id": "311254", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Issue is still reproducible using the following Environment:\r\n\r\nTested on:\r\nDevice : Google Nexus 7, Android Version: 4.4.4\r\nSDK: 3.3.0.v20140626144112\r\nCLI version : 3.3.0-rc2\r\nOS : Windows 8.1\r\nAlloy: 1.4.0-rc2\r\nACS: 1.0.15\r\nnpm:1.3.2\r\nLiveView: 1.0.4\r\nAppcelerator Studio, build: 3.3.0.201406231625\r\ntitanium-code-processor: 1.1.1", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-06-27T11:18:18.000+0000", "updated": "2014-06-27T11:18:18.000+0000" }, { "id": "311287", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~pmishra] That's because the fix is still in review. The fix has not been merged yet and this ticket has not been resolved yet.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-06-27T15:28:53.000+0000", "updated": "2014-06-27T15:28:53.000+0000" }, { "id": "311331", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If you update to android SDK tools ver23 & do not update build tools to ver19.1 or ver20 but stay at 19.0.3 , you will no longer have zipalign. \r\n\r\nThis is because previously the zipalign tool was placed inside the tools folder but with the update to ver23 it is placed inside folder \"build tools/build tools version folder\" e.g 19.1.0 or 20.0.0 etc. Then if do not update your sdk build tools then the zipalign will be removed from tools folder after android SDK tools update to rev23, leaving you with no zipalign.\r\n\r\nIn this case, you won't be able to use the workaround mentioned above as there will no zipalign present.\r\n\r\nYou will need to update the android build tools to ver19.1 or ver20 to keep zipalign.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-27T18:27:36.000+0000", "updated": "2014-06-27T20:52:47.000+0000" }, { "id": "311408", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "With r23 SDK and r19 build tools installed, I get the new multi-line error message as expected. With r23 and r20 build tools, zipalign is found and info and build commands work as expected. Passes.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-06-27T21:22:59.000+0000", "updated": "2014-06-27T21:22:59.000+0000" }, { "id": "311634", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nh6.1. Updated to latest Android build/sdk/platform tools.\r\n\r\nh6.2. Ran \"ti info -t android -o json\":\r\nDid not give me any errors related to zipalign.\r\n\r\nh6.3. Ran \"ti setup check\":\r\nCommand detected the new android tools & found the zipalign inside its new location.\r\n\r\nh6.4. Built an android app:\r\nBuilt an android app for android device/emulator & the app installed & launched successfully without any errors.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.3.0.201406271159\r\nTi SDK : 3.3.0.v20140627202512\r\nMac OSX : 10.8.5\r\nAlloy : 1.4.0-rc2\r\nCLI - 3.3.0-rc4\r\nCode Processor: 1.1.1\r\nNexus 5 - android 4.4.4", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-30T17:12:33.000+0000", "updated": "2014-06-30T17:12:33.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }