Using Mac OSX Mavericks, with Studio 3.2.1.201402041146.
I'm trying to run my app on my Samsung Galaxy Tab but my map always shows up blank. I have used isGooglePlayServicesAvailable() and verified that Google Play Services is installed on my tablet. All of the Android SDKs are up-to-date and I have Google Play Services installed as part of the SDK.
I have tired generating a new API key and verified that the SHA1 and application ID are correct. I have also verified that I have the Google Maps Android API v2 service turned on in my Google APIs Console.
In my tiapp.xml, I have the following:
<uses-permission android:name="com.myapp.app.permission.MAPS_RECEIVE"/> <permission android:name="com.myapp.app.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <application> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCF4d_IaK1gvOakmWym_Sa4Vrd9C4NP9IQ"/> </application>I also have this in my tiapp.xml to include the Map Module (which I have in ~/Library/Application Support/Titanium/modules/android/ti.map):
<modules> <module platform="android">ti.map</module> </modules>Here is my map code (I'm being sure to not open as modal as suggested by the Google Maps v2 for Android Guide and that I am adding my map after I open my window):
var createMap = function(latitude, longitude, title){ var Map = require('ti.map'); var anno = Map.createAnnotation({ latitude: latitude, longitude: longitude, title: title, pincolor: Map.ANNOTATION_GREEN }); var mapview = Map.createView({ mapType: Map.NORMAL_TYPE, region: {latitude:latitude, longitude:longitude, latitudeDelta: 0.01, longitudeDelta: 0.01}, regionFit: true, animate: true, userLocation: true, annotations: [anno], rotatesEnabled: true }); if (platform == 'iphone' || platform == 'ipad'){ if (major >= 7){ mainFindACourtWin.openWindow(courtContact); }else{ courtContact.open({modal:true}); }; courtContact.add(mapview); }else{ courtContact.open(); }; courtContact.addEventListener('open',function(){ courtContact.add(mapview); }); };But when I go to the window that should have my map, all I see is a black square with the map controls (the plus and minus buttons to zoom in/out). I get this in my Studio Console:
[ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [ERROR] : GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. [ERROR] : E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. [ERROR] : E/Google Maps Android API: Ensure that the following correspond to what is in the API Console: Package Name: com.myapp.app, API Key: AIzaSyCF4d_IaK1gvOakmWym_Sa4Vrd9C4NP9IQ, Certificate Fingerprint: CCE37F08FA039C8807BCCBAB7B8861F4759D479F [INFO] : I/Google Maps Android API: Failed to contact Google servers. Another attempt will be made when connectivity is established. [ERROR] : ViewRootImpl: sendUserActionEvent() mView == null [ERROR] : E/Google Maps Android API: Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).I'm not sure what else to try to get these maps to show up. Any ideas?