Docs / Setup / Android / ArcGIS

ArcGIS setup

How to drive the ArcGIS Maps SDK for Kotlin through MapConductor: add the Esri repository and pass the API key through the manifest. Both a 2D and a 3D view are available.

MODULE
com.mapconductor:for-arcgis
API KEY
Required
VIEW
ArcGISMapView / 2D
TIME
20 min
Same provider, other platformsiOSReact

Before you start

An Android development environment (Android Studio)
An ArcGIS developer account
An ArcGIS API key
STEP 01

Get an API key

  1. Create an ArcGIS developer account.
  2. Open the ArcGIS Developer Dashboard.
  3. Create an application and issue an API key with the scopes you need.
STEP 02

Add the Esri repository

settings.gradle.ktsKotlin
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()

        // Esri public repository for ArcGIS Maps SDK
        maven {
            url = uri("https://esri.jfrog.io/artifactory/arcgis")
        }
    }
}
STEP 03

Add the Secrets Gradle Plugin

This is how the key stays out of source control: the plugin reads secrets.properties and substitutes the value into the AndroidManifest.xml placeholder at build time.

(root)/build.gradle.ktsKotlin
plugins {
    id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") version "2.0.1" apply false
}
STEP 04

Add the dependencies

ArcGIS has its own BOM, and the Compose toolkit artifacts are required too.

app/build.gradle.ktsKotlin
plugins {
    // ... other plugins
    id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
}

dependencies {
    // ArcGIS Maps SDK
    implementation(platform("com.esri:arcgis-maps-kotlin-toolkit-bom:200.7.0"))
    implementation("com.esri:arcgis-maps-kotlin:200.7.0")
    implementation("com.esri:arcgis-maps-kotlin-toolkit-geoview-compose")
    implementation("com.esri:arcgis-maps-kotlin-toolkit-authentication")

    // MapConductor BOM pins every module below
    implementation(platform("com.mapconductor:mapconductor-bom:1.2.0"))

    implementation("com.mapconductor:core")
    implementation("com.mapconductor:for-arcgis")
}
STEP 05

Wire the manifest and the key

AndroidManifest.xmlXML
<manifest>
    <!-- Add internet and location permissions -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application>
        <!-- ArcGIS API Key -->
        <meta-data
            android:name="ARCGIS_API_KEY"
            android:value="${ARCGIS_API_KEY}" />
    </application>
</manifest>
secrets.propertiesProperties
ARCGIS_API_KEY=your_actual_arcgis_api_key_here
CAUTION
Never commit secrets.properties. Add it to .gitignore so it cannot slip in, and feed the value through environment variables (or another secure channel) in CI.
STEP 06

Set the license (production only)

Not needed for basic map display. For production, set the license as Esri's documentation describes.

MainActivity.ktKotlin
// In your Application class or MainActivity
// ArcGISEnvironment.setLicense("your_license_key_here") // Optional for basic use

VERIFY

What you should see

You are done when the ArcGIS map renders and zoom, pan and — on the 3D view — tilt all work.

TestArcGIS.ktJetpack Compose
@Composable
fun TestArcGIS(modifier: Modifier = Modifier) {
    val mapState = rememberArcGISMapViewState(
        cameraPosition = MapCameraPosition(
            position = GeoPoint(35.6762, 139.6503),
            zoom = 12.0,
        ),
    )

    // If the map appears, the setup is correct.
    // ArcGISMapView is the 3D scene view; ArcGISMapView2D shares the same state.
    ArcGISMapView(modifier = modifier, state = mapState)
}

Map designs

ArcGISDesign maps onto Esri's basemaps. The list below is a selection — the type ships many more.

ArcGISDesign
Notes
Streets
The standard street map
Imagery
Satellite imagery
Topographic
Topographic map
OsmStandard
The OpenStreetMap standard style
NavigationNight
Night navigation
DarkGray / LightGray
Muted styles meant as a backdrop for your own data

Troubleshooting

The map never loads

  • Check the API key in secrets.properties.
  • Confirm the key carries the required scopes in the Dashboard.

A licensing error appears

  • For production, set up licensing as Esri's documentation describes.

The build fails

  • Check that the map SDK coordinates and version match what your version catalog declares.
  • Make sure the repository is declared in settings.gradle.kts — with repositoriesMode set to FAIL_ON_PROJECT_REPOS, per-module repositories blocks are ignored.
  • If several map SDKs are present at once, look for dependency clashes with ./gradlew :app:dependencies.

Next

ArcGISMapView is the 3D view and ArcGISMapView2D the 2D one. They share a state object, so you can switch between them at runtime.