---
title: "Nutrient 2.2 migration guide"
canonical_url: "https://www.nutrient.io/guides/react-native/migration-guides/react-native-2-2-migration-guide/"
md_url: "https://www.nutrient.io/guides/react-native/migration-guides/react-native-2-2-migration-guide.md"
last_updated: "2026-06-09T10:24:43.327Z"
description: "Migration guide for Nutrient React Native SDK version 2.2 with breaking changes, API updates, and upgrade instructions."
---

This guide covers migrating to version 2.2 of Nutrient React Native SDK. It outlines how to compile the SDK version upgrade and how to upgrade Gradle.

### Compiling the SDK version upgrade

Nutrient React Native SDK 2.2 on Android requires a minimum `compileSdkVersion` of 31. When you upgrade to Nutrient 2.2, your Android build might fail if your `android` module’s `compileSdkVersion` is below 31.

To change `compileSdkVersion` for your Android module, open your module’s app-level Gradle file in `your_project_folder/android/app/build.gradle`, and set `compileSdkVersion` as shown below:

```kotlin

android {...
    compileSdkVersion 31...
}

```

Some projects may be using Gradle extra properties (`ext`) to store the version number in a separate `.gradle` file. In this case, update the value of the `compileSdkVersion` property. See our [example Catalog] for more detail.

### Gradle upgrade (recommended)

It’s recommended that you upgrade your version of Gradle, but this is optional. To upgrade, make the following changes:

In `your_project_folder/android/build.gradle`, change your Gradle version to 7.1.1:

```kotlin

dependencies {
  classpath('com.android.tools.build:gradle:7.1.1')
}

```

Then, update `your_project_folder/android/gradle/wrapper/gradle-wrapper.properties`:

```diff

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists

- distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip

+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrappe

```

Alternatively, you can open the `android` module of your project in the current stable Android Studio version 2021.1.1, and Android Studio will suggest an automatic Gradle update using [AGP Upgrade Assistant](https://developer.android.com/studio/build/agp-upgrade-assistant).
---

## Related pages

- [React Native 2 12 Migration Guide](/guides/react-native/migration-guides/react-native-2-12-migration-guide.md)
- [React Native 2 13 Migration Guide](/guides/react-native/migration-guides/react-native-2-13-migration-guide.md)
- [React Native 2 3 Migration Guide](/guides/react-native/migration-guides/react-native-2-3-migration-guide.md)
- [React Native 2 9 Migration Guide](/guides/react-native/migration-guides/react-native-2-9-migration-guide.md)
- [React Native 3 Migration Guide](/guides/react-native/migration-guides/react-native-3-migration-guide.md)
- [React Native 2 8 Migration Guide](/guides/react-native/migration-guides/react-native-2-8-migration-guide.md)
- [React Native 2 16 Migration Guide](/guides/react-native/migration-guides/react-native-2-16-migration-guide.md)
- [How to upgrade to the latest React Native version](/guides/react-native/migration-guides/upgrading.md)
- [React Native 4 Migration Guide](/guides/react-native/migration-guides/react-native-4-migration-guide.md)

