Skip to main content

Getting Started

System requirements#

  • Android minimum SDK: The MuPDF library needs Android version 5.0 or newer. Make sure that the minSdkVersion in your app's build.gradle is at least 21.
android {
defaultConfig {
minSdkVersion 21
...
}
...
}

Adding the App Kit to your project#

In order to include MuPDF in your app you need to use the Gradle build system.

The MuPDF App Kit can be retrieved as pre-built artifacts from a local app/libs folder location relative to your Android project. Your Android project's module build.gradle should add this location.

To add the MuPDF App Kit to your project add the dependencies section in your Module build.gradle (not the Project build.gradle)

dependencies {
// ensure these artifacts exist in your app/libs folder
implementation(name:'sodk_resources', ext:'aar')
implementation(name:'editor', ext:'aar')
implementation(name:'solib', ext:'aar')
implementation(name:'wheel', ext:'aar')
implementation(name:'mupdf', ext:'aar')
}
repositories {flatDir {dirs 'libs'}}
build.gradle (Module)

Fetching the artifacts#

Ensure to follow these steps:

Verify your integration#

To ensure you have correctly added the library to your project ensure that your source code files can reference import com.artifex.sonui.editor.NUIView without error.