Integrate the SDK
This guide describes the steps to install the most recent version of the Maps SDK for Android and configure your Android app to use the SDK.
Prerequisites
Download and install Android Studio from the official Android Developer website.
The procedures described in this document were carried out with Android Studio Narwhal 3 Feature Drop | 2025.1.3.
Option 1: Maven dependency
Magic Lane provides the Maps SDK for Android via Maven.
Step 1: Configure the Maven repository
Open your android project and open settings.gradle.kts file. Inside dependencyResolutionManagement tag and it's repositiories child add the following maven dependency :
- Kotlin
- Java
...
dependencyResolutionManagement {
...
repositories {
...
maven {
url = uri("https://developer.magiclane.com/packages/android")
}
}
}
// In settings.gradle (Groovy DSL)
// ...
dependencyResolutionManagement {
// ...
repositories {
// ...
maven {
url 'https://developer.magiclane.com/packages/android'
}
}
}
Step 2: Add the Maps SDK for Android dependency
Open your module-level build.gradle.kts file and add the following code inside the dependencies block to include the Maps SDK for Android:
- Kotlin
- Java
dependencies {
...
implementation("com.magiclane:maps-kotlin:1.7.0")
}
// In build.gradle (Groovy DSL)
dependencies {
// ...
implementation 'com.magiclane:maps-kotlin:1.7.0'
}
After that, press Sync Project with Gradle files.
Option 2: Local AAR library
Optionally you can download the Maps SDK for Android .aar file, then create the following project structure: your_project/app/libs/.
Add the .aar in the libs directory and the following code inside the dependencies block from the module-level build.gradle.kts file to include the Maps SDK for Android:
- Kotlin
- Java
dependencies {
implementation(files("libs/<AAR_FILE>.aar"))
}
// In build.gradle (Groovy DSL)
dependencies {
implementation files('libs/<AAR_FILE>.aar')
}
You are now ready to go to the next step: Implement the application code.