Maps SDK for Android quick reference

The Maps SDK for Android adds Google Maps data, map displays, and map gesture responses to Android apps, including Wear OS apps. You can add markers, polygons, and overlays to show information about map locations and support user interaction, using Kotlin or Java.

Maps SDK for Android: key facts

  • Product: Maps SDK for Android
  • Also known as: Google Maps Android API
  • Category: Maps
  • Platform: Android
  • Runs on: Client (app or browser code)
  • Launch stage: GA
  • Lifecycle: Active
  • Overview: Maps SDK for Android overview
  • Regional availability: Global. See the Google Maps Platform coverage page; the usage and billing page links separate global and India pricing lists. (coverage details)

Maps SDK for Android: when to use it

Use Maps SDK for Android when:

  • You need an interactive 2D Google map in a native Android or Wear OS app.
  • You need to add markers, info windows, polylines, polygons, ground overlays, or tile overlays to a map in an Android app.
  • You need Street View panoramas, lite mode (bitmap) maps, or Cloud-based map styling with map IDs in an Android app.
  • You build an Android map in Kotlin or Java, including Jetpack Compose through the Maps Compose library.

Don't use Maps SDK for Android when:

Maps SDK for Android: setup

Official Maps SDK for Android packages:

  • maven: com.google.android.gms:play-services-maps

Maps SDK for Android: common mistakes

  • Problem: Since SDK v20.0.0, the SDK manifest no longer includes the org.apache.http.legacy library. Apps that load the legacy map renderer can crash with java.lang.NoClassDefFoundError. Fix: Add inside the tag of the app's AndroidManifest.xml. Devices with Google Play services 25.50.34 or later aren't affected. See /maps/documentation/android-sdk/release-notes.
  • Problem: Advanced Markers need the upgraded map renderer. If you add them to an existing app without rebuilding it, the app can still use the legacy renderer. Fix: Rebuild the app with SDK 18.2.0 or later so the upgraded renderer is the default. See /maps/documentation/android-sdk/advanced-markers/start.
  • Problem: Devices that don't meet the renderer requirements (Android 5.0/API 21 or later, Google Play services 21.39.14 or later, Play Store enabled) fall back to the legacy renderer, so features that need the new renderer, such as Cloud-based maps styling, aren't available on them. Fix: Call MapsInitializer.initialize(context, MapsInitializer.Renderer.LATEST, callback) and check the MapsInitializer.Renderer value passed to OnMapsSdkInitializedCallback.onMapsSdkInitialized(), or check GoogleMap.getMapCapabilities(). If the device uses LEGACY, don't rely on Cloud-based maps styling or Advanced Markers. See /android/reference/com/google/android/gms/maps/OnMapsSdkInitializedCallback.
  • Problem: The SDK requires Google Play services on the device where the app runs. Fix: Optionally call the Google Play services availability check from your app. See /maps/documentation/android-sdk/config.

Maps SDK for Android: legacy and deprecated features

  • Legacy map renderer: Deprecated since 2024-03-04. Replacement: Upgraded (latest) map renderer, which is the default since SDK 18.2.0. Symptom: Cloud-based maps styling, advanced polyline customizations, and Advanced Markers aren't available on the legacy renderer. See the migration guide.

What you can do with Maps SDK for Android

See the guides linked below for each task, or compare across products in the Capabilities Explorer.

Maps SDK for Android: Data-driven styling for boundaries

Maps SDK for Android: Data-driven styling for datasets

Maps SDK for Android: Datasets

Maps SDK for Android: Maps

Maps SDK for Android: Maps annotations

Maps SDK for Android: Maps styling

Maps SDK for Android: Street View