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.4.2/anylinesdk-54.4.2.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.4.2
for the latest version.
// Root section of the file
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
// Include transitive dependencies
implementation 'com.squareup.moshi:moshi:1.14.0'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
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
}
By following these steps, you integrate the Anyline SDK locally into your project, facilitating offline development.