{ "id": "113985", "key": "AC-1834", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-13T19:07:44.000+0000", "created": "2013-05-08T09:53:55.000+0000", "labels": [ "android", "cli", "mapv2" ], "versions": [], "issuelinks": [], "assignee": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:44.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" }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I'm trying to integrate the module for *Google Maps Android API v2* in my android app.\r\n\r\nh1. Description\r\n\r\nI have done every steps explained in these 2 pages :\r\n\r\n- [Titanium Map API|http://docs.appcelerator.com/titanium/3.0/#!/api/Modules.Map]\r\n- [Getting Started Google Maps Android API v2|https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key]\r\n\r\nAnd I have implemented a minimal app :\r\n\r\n{code:javascript|title=app.js|borderStyle=solid}\r\nvar win = Titanium.UI.createWindow();\r\n \r\nvar MapModule = require('ti.map');\r\nvar mapView = MapModule.createView({\r\n mapType: MapModule.NORMAL_TYPE,\r\n region: {latitude:33.74511, longitude:-84.38993,\r\n latitudeDelta:0.01, longitudeDelta:0.01},\r\n animate:true,\r\n regionFit:true,\r\n userLocation:true\r\n});\r\nwin.add(mapView);\r\n \r\nwin.open();\r\n{code}\r\n\r\nUntil here, everything is ok...\r\nThe next logic step is to test this code by building it and installing it on my device (and not in the emulator, since this module is not supported on it : cf. Titanium Map API)\r\nThus, I build my app with the CLI :\r\n\r\n{code}\r\ntitanium build \\\r\n --platform android \\\r\n --target device \\\r\n -s 3.1.0.GA \\\r\n --deploy-type test \\\r\n --android-sdk /Users/romainsalles/android-sdk/ \\\r\n --project-dir /Users/romainsalles/Dev/mapv2 \\\r\n --keystore /Users/romainsalles/Dev/mapv2/mapv2-test.keystore \\\r\n --password AWESOME_PASSWORD \\\r\n --alias KEYSTORE_ALIAS \\\r\n --output-dir /Users/romainsalles/Dev/mapv2/build/android \\\r\n --avd-id 4\r\n{code}\r\n\r\nh1. Errors\r\n\r\nThe *app opens but I don't have any map*. Nevertheless, I have the map buttons (cf. *mapv2_empty.png*)\r\nThe errors obtained are these ones :\r\n\r\n{code}\r\n05-07 18:46:12.332: E/Google Maps Android API(28174): Authorization failure.\r\n05-07 18:46:12.572: E/Google Maps Android API(28174): Failed to load map. Could not contact Google servers.\r\n{code}\r\n\r\nI think these errors are due the fact that the app is signed with the Titanium keystore instead of mine. Indeed, the logs of the CLI return :\r\n\r\n{code}\r\n[DEBUG] keytool -v -list -keystore \"/Users/romainsalles/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/dev_keystore\" -storepass ******* -alias tidev\r\n[DEBUG] jarsigner -sigalg MD5withRSA -digestalg SHA1 -storepass ******* -keystore \"/Users/romainsalles/Library/Application Support/Titanium/mobilesdk/osx/3.1.0.GA/android/dev_keystore\" -signedjar /Users/romainsalles/Dev/mapv2/build/android/bin/app.apk /Users/romainsalles/Dev/mapv2/build/android/bin/app-unsigned.apk tidev\r\n{code}\r\n\r\nh1. A (not satisfying) solution\r\n\r\nThen, I have tried to build the app with the plain old titanium commands :\r\n\r\n{code}\r\n/Users/romainsalles/Library/Application\\ Support/Titanium/mobilesdk/osx/3.1.0.GA/android/builder.py distribute \\\r\n Mapv2 \\\r\n /Users/romainsalles/android-sdk/ \\\r\n /Users/romainsalles/Dev/mapv2 \\\r\n com.mapv2 \\\r\n /Users/romainsalles/Dev/mapv2/mapv2-test.keystore \\\r\n AWESOME_PASSWORD \\\r\n KEYSTORE_ALIAS \\\r\n /Users/romainsalles/Dev/mapv2/build/android \\\r\n 4 \\\r\n 8\r\n{code}\r\n\r\nThen, I download the app on my android and install it (note : the android ask me if accept the different permissions). Then, the *app opens and I can see the map* (cf. *mapv2_ok.png*)\r\n\r\nh1. The issue\r\n\r\nI have worked on this problem a lot, but I didn't found any solution... Did I miss something or is it really impossible to build an app using the * Google Maps Android API v2* with the CLI ?", "attachment": [ { "id": "38233", "filename": "app.js", "author": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-08T09:53:55.000+0000", "size": 349, "mimeType": "text/javascript" }, { "id": "38231", "filename": "mapv2_empty.png", "author": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-08T09:53:55.000+0000", "size": 15784, "mimeType": "image/png" }, { "id": "38232", "filename": "mapv2_ok.png", "author": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-05-08T09:53:55.000+0000", "size": 123033, "mimeType": "image/png" } ], "flagged": false, "summary": "Google Maps Android API v2 doesn't work when I build the app with new CLI", "creator": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "environment": "- *Titanium API* : 3.1.0.GA\r\n- *Android API* : 17\r\n- *Devices* : different androids (Xperia, S3, ...)\r\n- *OS* : Mac OS X 10.8.3\r\n- *Titanium Studio* : 3.1.0.201304151600 (but not used since a build with the command lines)\r\n- *Node* : 0.8.22", "comment": { "comments": [ { "id": "257706", "author": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "body": "I see this Jira has been re-assigned.\nI have solved my issue since the creation of this post.\n\nIt was an issue with the keystore. I hadn't used yours for my build and, of course, it couldn't work.\nThus, you can close this Jira.\n\nSorry for forgetting to update the Jira.", "updateAuthor": { "name": "romain.salles", "key": "romain.salles", "displayName": "Romain Salles", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-06-13T19:00:34.000+0000", "updated": "2013-06-13T19:00:34.000+0000" }, { "id": "257714", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks - closing.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-13T19:07:44.000+0000", "updated": "2013-06-13T19:07:44.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }