Google map signed api key errors in Android

Jen picture Jen · Sep 4, 2011 · Viewed 70.5k times · Source

When I switched from my debug map key to my signed map key my maps stop working. I get the following errors in logcat:

09-03 18:18:04.112: WARN/System.err(4073): IOException processing: 26
09-03 18:18:04.112: WARN/System.err(4073): java.io.IOException: Server returned: 3
09-03 18:18:04.112: WARN/System.err(4073):     at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
09-03 18:18:04.112: WARN/System.err(4073):     at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
09-03 18:18:04.112: WARN/System.err(4073):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
09-03 18:18:04.112: WARN/System.err(4073):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
09-03 18:18:04.112: WARN/System.err(4073):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
09-03 18:18:04.112: WARN/System.err(4073):     at java.lang.Thread.run(Thread.java:1019)

I've double checked everything, permissions and library are in place. I've recreated the singed key and no luck.

Any ideas?

Answer

Sagar Hatekar picture Sagar Hatekar · Jan 24, 2012

I had the same problem and I figured there wasn't any helpful answer around on the internet so hoping this should help everyone in the future.

When using GoogleMaps for Android, you need two keys - debug and release.

The "debug" key is kind of a misleading term. This key is also to be used when you develop the app in Eclipse. So essentially, use the debug key for development, testing, debugging.

When you're ready to launch the app to Market, set the android:debuggable="false" in the AndroidManifest.xml and use the Signed API key.

When using the signed API key, the MapView will show up ONLY when the app is installed from the Android Market. So, installing the app from Eclipse (Run As, Debug As, etc) or command line (adb install) won't show the MapView. Rest assured, once the app is in the Market - you download it and the MapView will show up.

With the signed API key, if you deploy the app from Eclise, you will get a "Server returned 3, IOProcessing Exception 26" as a warning - just ignore it.

Note: Also ensure there are no duplicate instances of the same MapView. If your app needs "x" no. of MapViews, generate "x" no. of new signed keys (one for each MapView) since GoogleMaps has a query limit for a single MapView instance.

For getting both the keys, follow the steps for Obtaining API keys for GoogleMaps on Android.

Happy Coding!

UPDATE:

The link above for obtaining api keys is now a deprecated procedure. Refer Obtaining API keys for GoogleMaps Android API v2 going forward.