Project set up

VERSION 0.3.34
PUBLIC PREVIEW

To use Maps SDK in your application you need to obtain a TomTom API key by following these instructions. Remember to keep your API key secure.

This guide describes how to prepare your Android project for using TomTom SDKs.

  1. Install Android Studio if you don’t already have it.
  2. Create a new project or open an existing one. Make sure that the minimum SDK API level is set to at least 21 (Android 5.0 "Lollipop") and that compile SDK API level is set to 31.
  3. Add the packagingOptions.
    1android {
    2 ...
    3 packagingOptions {
    4 pickFirst "lib/**/libc++_shared.so"
    5 }
    6}
  4. To get access to the TomTom SDK repository, add the following to your settings.gradle file
    1dependencyResolutionManagement {
    2 repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    3 repositories {
    4 google()
    5 mavenCentral()
    6 maven {
    7 url = uri("https://repositories.tomtom.com/artifactory/maven")
    8 }
    9 }
    10}
  5. Add the dependencies that you need in your application to your module’s build.gradle file and synchronize the project.

Next steps

Now that you’ve set up your project, here are some suggestions for what to do with it: