Get started

Get started with ArcGIS Maps SDK for Kotlin:

  1. Review system requirements
  2. Install and set up
  3. Get an API key (to access services)
  4. Complete the Display a map tutorial

1. System requirements

Ensure your development environment meets the system requirements.

For an overview of this release, including enhancements, deprecations, and known issues, see the Release notes.

2. Install and set up

We recommend installing with Gradle, which will install the needed dependencies and SDK binaries from Esri's Maven repository.

Get the API with Gradle

Perform the following set up steps in an existing Android Studio project, or create a new project.

  1. In your settings.gradle file, within the repositories block of the dependencyResolutionManagement block, add a maven block and specify the URL of Esri's Maven repository. Esri's repository is not open source and therefore not available from google() or mavenCentral(), so you must specify this URL.

    settings.gradle
    Use dark colors for code blocks
              
    Add line.Add line.Add line.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
            maven {
                url 'https://esri.jfrog.io/artifactory/arcgis'
            }
        }
    }
  2. In your module-level build.gradle file, within the dependencies block, add the ArcGIS Maps SDK for Kotlin dependency to your app.

    build.gradle
    Use dark colors for code blocks
        
    Add line.
    1
    2
    3
    4
    dependencies {
        . . .
        implementation 'com.esri:arcgis-maps-kotlin:200.0.0-beta01'
    }
  3. In your module-level build.gradle file, within the android block, make sure you have a buildFeatures block that enables view binding or data binding. For more information on view binding, see https://developer.android.com/topic/libraries/view-binding. For more information on data binding, see https://developer.android.com/topic/libraries/data-binding/start.

    build.gradle
    Use dark colors for code blocksCopy
               
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    android {
        . . .
        buildFeatures {
            viewBinding true
        }
    
        // buildFeatures {
        //     dataBinding true
        // }
        . . .
    }
  4. In your module-level build.gradle file, within the android block, make sure you have a packagingOptions block that excludes duplicates of the META-INF\DEPENDENCIES file. This setting will prevent a compiler error that occurs if you try to include the same file in the META-INF directory more than once in the output. For more information on packaging options, see https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/PackagingOptions.

    build.gradle
    Use dark colors for code blocksCopy
           
    1
    2
    3
    4
    5
    6
    7
    android {
        . . .
        packagingOptions {
            exclude 'META-INF/DEPENDENCIES'
        }
        . . .
    }

3. Access services and content with an API key

API keys are permanent tokens that grant your application access to ready-to-use services and, with an ArcGIS Developer account, private content hosted in ArcGIS (currently in beta). Your apps will always require an access token, such as an API key or OAuth 2.0 token, in order to access these resources. Refer to authentication methods in the developer guide for details.

To set an API key in your application, find and copy an API key from your developer dashboard and replace the string YOUR_API_KEY / ACCESS_TOKEN in your code with the API key copied from your dashboard. This key is scoped to provide access to all of the services and resources shown in the tutorials.

  1. Log in to your developer dashboard.
  2. Select and copy your default API key, or generate a new one.
  3. In your code, replace the string YOUR_API_KEY / ACCESS_TOKEN with the API key from your dashboard.

4. Tutorials

Follow step-by-step instructions to build apps that incorporate key features of ArcGIS Maps SDK for Kotlin.

Display a map

Add a point, line, and polygon

Display a web map

Display device location

Browse all tutorials

Deploy your app

No license is required to develop your apps; there is no need to authorize your development machine or devices. As a member of the ArcGIS Developer Program, you have a free ArcGIS Developer Account (Essentials Plan). With this plan, you can download and install any ArcGIS SDK and immediately have access to all the functionality of the APIs for development purposes. You can become a member of the developer program for free.

You need an ArcGIS Developer Subscription to deploy an app to your users. The Essentials plan is free.

Learn more about licensing and deployment and get your license string at License and deployment.

Next steps

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.