Skip to Content
NexPDF

Installation

Add the NexPDF Android AAR to a Gradle project from the release's Maven repository.

English

Download the SDK

From the v1.1.0 release, download one of:

FileContents
nexpdf-android-1.1.0-maven.zipA Maven repository on disk with com.nexdevit:nexpdf-android:1.1.0
nexpdf-android-1.1.0.aarThe AAR alone

Unzip the Maven repository into your project, for example as nexpdf-maven/.

Add the repository and the dependency

settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("nexpdf-maven") }
    }
}
app/build.gradle.kts
dependencies {
    implementation("com.nexdevit:nexpdf-android:1.1.0")
}

To use the AAR file alone instead, copy it to app/libs/ and add implementation(files("libs/nexpdf-android-1.1.0.aar")).

Check the minimum SDK

Set minSdk = 24 or higher. The AAR contains native libraries for arm64-v8a, armeabi-v7a and x86_64; if you set ndk.abiFilters, keep to those.

Check the installation

import com.nexdevit.nexpdf.NexPdfJni

Log.i("NexPDF", "version " + NexPdfJni.version())

What the AAR adds

  • The native libraries libnexpdf_ffi.so (the engine) and libnexpdf_jni.so (the JNI bridge).
  • The NexPdfReaderActivity declaration in the merged manifest (not exported).
  • Consumer keep rules for R8 and ProGuard that keep NexPdfJni, NexPdfLicense, NexPdfReaderActivity and NexPdfUIConfig.

Bundle the license

Put nexpdf_license.xml in app/src/main/assets/, or the key in the manifest, as described in License.

nexpdf_license.xml
AndroidManifest.xml
build.gradle.kts

On this page