Add the dependency
The MapTrip SDK consists of a native library compiled for arm64-v8a, armeabi-v7a, x86 and x86_64. The library can be integrated directly via Maven or as AAR file.
Add the dependency via Maven
- Gradle v6.0 or later: Edit your settings settings.gradle, and declare the repository with the following code:
| dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven {
url "https://artifactory.infoware.de/artifactory/libs-gradle"
}
}
}
|
- Gradle less than v6.0: Edit your project-level build.gradle file instead, and add the code below to declare the repository:
| allprojects {
repositories {
maven {
url "https://artifactory.infoware.de/artifactory/libs-gradle"
}
}
}
|
- Modify app/build.gradle to add the build rule
| implementation "de.infoware:maptrip-sdk:9.9.7"
|
- Verify that your project's minSdkVersion (app/build.gradle) is API 14 or higher.
Add the dependency as aar
- Navigate to File → Project Structure → Dependencies
- Next, navigate to Declared Dependencies, click +, and select JAR/AAR Dependency in the dropdown menu
- In the dialog, first enter your path to the MapripAPI.aar file and select the desired configuration. Usually, it is implementation if the library should be available to all configurations.
- Finally, verify that your app/build.gradle contains something similar to:
| implementation files('libs/MapTripAPI.aar')
|
- Verify that your project's minSdkVersion (app/build.gradle) is API 14 or higher.