This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/advanced-integration/manual-library-integration.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Manual library integration

Use manual AAR integration when your project requires a local AAR file.

For most projects, refer to the integrating Nutrient Android SDK using Gradle guide instead. Existing integrations using the io.nutrient:nutrient coordinate from https://my.nutrient.io/maven continue to work during the transition period. Maven Central doesn’t host the OCR add-on (io.nutrient:nutrient-ocr). Use https://my.nutrient.io/maven to access OCR.

Add the AAR bundle to your project with these steps:

  1. Download the Nutrient Android SDK library AAR bundle from Maven Central(opens in a new tab).
  2. Copy it to your project’s libs directory.
  3. Add it as a file-based dependency with the required transitive dependencies:
dependencies {
implementation(files("libs/nutrient-android-sdk-12.1.0.aar"))
// You must include all transitive dependencies of Nutrient.
implementation("com.google.android.material:material:1.14.0")
implementation("androidx.appcompat:appcompat:1.8.0")
implementation("androidx.cardview:cardview:1.0.0")
implementation("androidx.constraintlayout:constraintlayout:2.2.2")
implementation("androidx.exifinterface:exifinterface:1.4.2")
implementation("androidx.fragment:fragment-ktx:1.9.0")
implementation("androidx.fragment:fragment-compose:1.9.0")
implementation("androidx.gridlayout:gridlayout:1.1.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.preference:preference:1.2.1")
implementation("androidx.recyclerview:recyclerview:1.4.0")
implementation("androidx.viewpager2:viewpager2:1.1.0")
implementation("androidx.webkit:webkit:1.17.0")
implementation("androidx.compose.foundation:foundation:1.12.0")
implementation("androidx.compose.material:material-icons-core:1.7.8")
implementation("androidx.compose.material3:material3:1.4.0")
implementation("androidx.compose.runtime:runtime:1.12.0")
implementation("androidx.compose.ui:ui:1.12.0")
implementation("org.jetbrains.kotlin:kotlin-parcelize-runtime:2.4.10")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.4.10")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0")
}

Some features need runtime-only libraries. Gradle resolves these libraries when you add Nutrient from Maven, but a file-based AAR dependency doesn’t include them. Add the dependencies for each feature you use:

  • AI Assistant — Add all the dependencies below.
  • Instant, digital signatures with timestamps or long-term validation (LTV), and OfficeToPdfConverter — Add OkHttp only.
dependencies {
// Instant, signature timestamps and LTV, OfficeToPdfConverter, and AI Assistant.
implementation(platform("com.squareup.okhttp3:okhttp-bom:5.5.0"))
implementation("com.squareup.okhttp3:okhttp")
// AI Assistant.
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.11.0")
implementation("io.noties.markwon:core:4.6.2")
implementation("io.noties.markwon:ext-strikethrough:4.6.2")
implementation("io.noties.markwon:ext-tables:4.6.2")
implementation("io.noties.markwon:html:4.6.2")
implementation("io.noties.markwon:linkify:4.6.2")
implementation("io.socket:socket.io-client:2.1.2") {
// Android already provides org.json.
exclude(group = "org.json", module = "json")
}
}

Android Gradle plugin (AGP) 3.5 deprecated flatDir repositories. Use file-based AAR dependencies.

Nutrient Maven repository

Existing integrations that download the AAR from https://my.nutrient.io/maven with the io.nutrient:nutrient coordinate keep working during the transition period. That AAR is the same SDK as the Maven Central one, so the transitive dependencies above apply unchanged. Download the AAR bundle from the Nutrient Maven repository(opens in a new tab) and reference it as libs/nutrient-{% $LATEST_VERSIONS.ANDROID %}.aar instead.

Maven Central doesn’t host the OCR add-on (io.nutrient:nutrient-ocr) yet. Use https://my.nutrient.io/maven for OCR.

You must log in to the Nutrient Portal(opens in a new tab) before accessing the Nutrient Maven repository.

ProGuard

Nutrient uses consumersProguardFiles to preserve required symbols during obfuscation. You don’t need to add ProGuard rules.

To inspect the rules, open proguard.txt inside the Nutrient .aar file:

Terminal window
cd [YOUR_AAR_LOCATION]
unzip [YOUR_AAR_NAME].aar -d aar-contents
cat aar-contents/proguard.txt