{ "id": "82678", "key": "TIMOB-6860", "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": "15699", "description": "2013 Sprint 21", "name": "2013 Sprint 21", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "15701", "description": "2013 Sprint 21 Core", "name": "2013 Sprint 21 Core", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-10-19T01:18:47.000+0000", "created": "2011-11-14T11:46:53.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "androidbuild", "ay-verified", "cb-verified" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "30599", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "81129", "key": "TIMOB-5438", "fields": { "summary": "Android: Add compiler warning when using maps with Non-Google APIs SDK", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-11-12T12:33:19.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" }, { "id": "10207", "name": "Tooling" } ], "description": "h2. Problem\r\n\r\nFor a Titanium mobile project on Android, if Titanium sees that you're using a Ti.Map.createView in your project, running on the emulator will fail unless your run configuration indicates use of one of the \"Google APIs\" Android API. I assume it is scanning the source js files for this. That's fine.\r\n\r\nThe problem is that if the only place you have the text \"Ti.Map.createView\" is in a comment (// comment), Titanium does the same thing, and fails to install with the message, {{Package com.testing.testing9 requires unavailable shared library com.google.android.maps; failing!}}. I have to think that there are other things like that too.\r\n\r\nTitanium's build process should not detect things like this that are in comments, thus triggering the \"Google APIs\" requirement.\r\n\r\nI do not know if this affects iOS as well.\r\n\r\nh2. Test case\r\n\r\n{code:lang=javascript|title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n layout:'vertical',\r\n exitOnClose:true,\r\n navBarHidden:true\r\n});\r\nvar label = Ti.UI.createLabel({\r\n color:'white',\r\n text:'Hello World',\r\n width:'auto'\r\n});\r\nwin.add(label);\r\n\r\n// some day add a Ti.Map.createView to this\r\n\r\nwin.open();\r\n{code}\r\n\r\nh2. Logs\r\n\r\n{code}\r\n 403 AndroidRuntime D >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<\r\n 403 AndroidRuntime D CheckJNI is ON\r\n 403 AndroidRuntime D --- registering native functions ---\r\n 87 PackageParser D Scanning package: /data/app/vmdl28961.tmp\r\n 87 PackageManager D Scanning package com.testing.testing9\r\n 87 PackageManager E Package com.testing.testing9 requires unavailable shared library com.google.android.maps; failing!\r\n 87 PackageManager W Package couldn't be installed in /data/app/com.testing.testing9-1.apk\r\n 403 AndroidRuntime D Shutting down VM\r\n 403 AndroidRuntime I NOTE: attach of thread 'Binder Thread #3' failed\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Tooling: Android build process requires \"Google APIs\" even if \"Ti.Map.createView\" only occurs in comments", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "* Android emulator (2.2) and device (HTC Aria)\r\n* Titanium SDK version: 1.8.0.1 (12/22/11 13:09 fbdc96f)\r\n* JS Runtime v8\r\n* Ubuntu 10.04\r\n", "comment": { "comments": [ { "id": "177140", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Shawn - thanks for raising this ticket. Good find! ;)\r\n\r\nPlease note the changes I had to make in order to bring it in line with [JIRA Ticket Checklist|https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist] so that I may escalate it to our engineering team.\r\n\r\nI will move it across now.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-23T16:15:42.000+0000", "updated": "2011-12-23T16:15:42.000+0000" }, { "id": "209098", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "I would like to withdraw this ticket. The fact that \"Ti.Map.createView\" in a comment triggers the need for the Google APIs is actually useful to me now. I don't see that I can resolve or delete a ticket that I created, so can someone at Appcelerator kill this ticket for me? Thanks.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-24T07:57:30.000+0000", "updated": "2012-07-24T07:57:30.000+0000" }, { "id": "264666", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Chris, please note my comment above about withdrawing/deleting this ticket.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-02T12:23:21.000+0000", "updated": "2013-08-02T12:23:21.000+0000" }, { "id": "264679", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~bitshftr] I'm not sure why the way things work is useful? The old API usage detector was very naive. iOS and Mobile Web's build scripts use UglifyJS so that we know exactly what Titanium APIs you're using. This will result in smaller apps which is one of the other tickets that I have on my radar. But furthermore, if you're doing an emulator build and I know you're using a MapView, I can make sure that you have the correct Google API for your AVD or create a new AVD. What do you think?", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-08-02T16:27:59.000+0000", "updated": "2013-08-02T16:27:59.000+0000" }, { "id": "264680", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "We have a \"library\" of JS units that we use in all of our apps. This library lives in a virtual subdirectory under the Resources directory of each app. With the current behavior, I can (somewhat) control what Ti APIs get brought in to any given app by having the Ti.Map.createView only exist within my maps library wrapper, and then only in pieces (tm=Ti.Map; tm.createView), so that Titanium doesn't automatically bring it in. In apps that actually use maps, I have a comment that contains the full Ti.Map.createView, to force the map API to be linked in.\r\n\r\nNow, I understand this is a kludge. If you can give us build configurations with an \"exclude these JS files from this build configuration\" feature, then I wouldn't need this kludge. There's another JIRA ticket for that somewhere.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-02T16:55:01.000+0000", "updated": "2013-08-02T16:55:01.000+0000" }, { "id": "264683", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~bitshftr] Working on it. :) Just for reference:\n\nTIMOB-12025 CLI: Support build profiles to allow multiple build outputs\n\nTIMOB-11120 Android: Expose a way for users to exclude js files from being encrypted.\n\nTIMOB-3797 Tooling: Ignore files listed in tiapp.xml\n\nTIMOB-2478 Tooling: Allow Excluding JS files from Compilation", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-08-02T17:30:22.000+0000", "updated": "2013-08-02T17:30:22.000+0000" }, { "id": "264687", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Chris, good stuff...all of them.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-08-02T17:38:29.000+0000", "updated": "2013-08-02T17:38:29.000+0000" }, { "id": "275801", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4781", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-19T01:18:47.000+0000", "updated": "2013-10-19T01:18:47.000+0000" }, { "id": "279129", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Android build process runs fine when \"Ti.Map.createView\" occurs in comments. No error occurs.\r\n\r\nVerified fixed on:\r\nAppcelerator Studio, build: 3.2.0.201311112306\r\nSDK:3.2.0.v20131111174605\r\nalloy: 1.3.0\r\nCLI : 3.2.0\r\nXcode:5.0.1\r\nDevice: Google nexus 7(v4.3)\r\nOS: Mac OSX 10.9", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-11-12T12:33:19.000+0000", "updated": "2013-11-12T12:33:19.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }