Adding Anyline Mobile SDK for Android as a local dependency
If you prefer to include the Anyline SDK as a local library in your project, you can follow these steps. This allows you to work with an offline version of the SDK.
Step 1: Download the Anyline SDK
Download the offline version of the Anyline SDK from the Maven Repository using the following link: https://mobile-sdk-android.anyline.io/release/io/anyline/anylinesdk/54.6.0/anylinesdk-54.6.0.aar
Step 2: Copy AAR to Project
Copy the downloaded .aar
file to the libs
directory of your Android project. This directory is typically located under app/libs
. Ensure that the AAR file is named appropriately, using the specified version.
Step 3: Specify Dependency in build.gradle
Replace LATEST_SDK_VERSION
in the code block below with 54.6.0
for the latest version.
// Root section of the file
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
// Include transitive dependencies
implementation 'com.squareup.moshi:moshi:1.15.2'
implementation 'androidx.core:core-ktx:1.5.0' //or greater
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0" //or greater
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0' //or greater
implementation "com.google.guava:guava:29.0-android"
// Load Anyline SDK as a local dependency
implementation(name:'anylinesdk-LATEST_SDK_VERSION', ext:'aar')
//... Add your other dependencies
}
You may also need to disable Jetifier in your gradle.properties
file, based on the Support Libraries and AndroidX dependencies of your project.
android.enableJetifier=false
By following these steps, you integrate the Anyline SDK locally into your project, facilitating offline development.