Nutrient 5.1 migration guide
This article provides a set of guidelines for migrating from version 5.0 to version 5.1 of Nutrient Android SDK. If you’re upgrading from a version earlier than 5.0, review the Android 5 migration guide first.
AndroidX
Nutrient Android SDK now uses AndroidX instead of the support library, which means you’ll have to migrate your applications in order to continue using Nutrient. The complete migration instructions can be found here(opens in a new tab). You can let Android Studio automatically migrate your project.

However, you might still need to manually update a few things afterward before everything is working properly.
Notable changes and deprecations
- XfdfFormatter#writeXfdf[Async]()now throws an exception when an annotation that isn’t attached to the document is passed in.
- Deprecates TextSearchconstructors takingContext. Use other overloads instead.
- Deprecates the SearchOptions.Builder()constructor takingContext. Use the default constructor instead.
- Deprecates isShareEnabled()inPdfActivityConfiguration. UsePdfConfiguration#getEnabledShareFeatures()instead.
- Deprecates enableShare()anddisableShare()inPdfActivityConfiguration.Builder. UsePdfActivityConfiguration.Builder#setEnabledShareFeatures()instead.
- Deprecates isTextSharingEnabled(),isEmbeddedFilesSharingEnabled, andisSharingNoteEditorContentEnabled()inPdfConfiguration. UsePdfConfiguration#getEnabledShareFeatures()instead.
- Deprecates textSharingEnabled(),embeddedFileSharingEnabled(), andsharingNoteEditorContentEnabledinPdfConfiguration.Builder. UsePdfConfiguration.Builder#setEnabledShareFeatures()instead.
Java 8 support
Since Nutrient Android SDK 5, apps including Nutrient need to enable Java 8 support. In order to enable Java 8 support, follow the instructions below.
- Make sure you’re using version - 3.2.1or higher of the Android Gradle plugin. In your top-level- build.gradlefile, add:classpath 'com.android.tools.build:gradle:3.2.1'
- In your app-level - build.gradlefile, enable Java 8 support:compileOptions {sourceCompatibility JavaVersion.VERSION_1_8targetCompatibility JavaVersion.VERSION_1_8}
 
  
  
  
 